Adobe InCopy CS6 (8.0) Object Model JS: HtmlItems

InCopy CS6

Class

HtmlItems

 A collection of embedded HTML page items.

See also HtmlItem.

QuickLinks

[], add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

HtmlItem [] (index: number)
Returns the HtmlItem with the specified index.

ParameterTypeDescription
indexnumberThe index.

HtmlItem add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: varies][, withProperties: Object])
Creates a new HtmlItem

ParameterTypeDescription
layerLayerThe layer on which to create the HtmlItem. (Optional)
atLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
The location at which to insert the HtmlItem relative to the reference object or within the container object. (Optional) (default: LocationOptions.UNKNOWN)
referenceDocument
Layer
MasterSpread
Page
PageItem
Spread
The reference object. Note: Required when the at parameter is before or after. Can accept: Document, Spread, MasterSpread, Page, Layer or PageItem. (Optional)
withPropertiesObjectInitial values for properties of the new HtmlItem (Optional)

HtmlItem anyItem ()
Returns any HtmlItem in the collection.

number count ()
Displays the number of elements in the HtmlItem.

Array of HtmlItem everyItem ()
Returns every HtmlItem in the collection.

HtmlItem firstItem ()
Returns the first HtmlItem in the collection.

HtmlItem item (index: varies)
Returns the HtmlItem with the specified index or name.

ParameterTypeDescription
indexLong Integer
String
The index or name. Can accept: Long Integer or String.

HtmlItem itemByID (id: number)
Returns the HtmlItem with the specified ID.

ParameterTypeDescription
idnumberThe ID.

HtmlItem itemByName (name: string)
Returns the HtmlItem with the specified name.

ParameterTypeDescription
namestringThe name.

Array of HtmlItem itemByRange (from: varies, to: varies)
Returns the HtmlItems within the specified range.

ParameterTypeDescription
fromHtmlItem
Long Integer
String
The HtmlItem, index, or name at the beginning of the range. Can accept: HtmlItem, Long Integer or String.
toHtmlItem
Long Integer
String
The HtmlItem, index, or name at the end of the range. Can accept: HtmlItem, Long Integer or String.

HtmlItem lastItem ()
Returns the last HtmlItem in the collection.

HtmlItem middleItem ()
Returns the middle HtmlItem in the collection.

HtmlItem nextItem (obj: HtmlItem)
Returns the HtmlItem whose index follows the specified HtmlItem in the collection.

ParameterTypeDescription
objHtmlItemThe HtmlItem whose index comes before the desired HtmlItem.

HtmlItem previousItem (obj: HtmlItem)
Returns the HtmlItem with the index previous to the specified index.

ParameterTypeDescription
objHtmlItemThe index of the HtmlItem that follows the desired HtmlItem.

string toSource ()
Generates a string which, if executed, will return the HtmlItem.

Element of

GraphicLine.htmlItems

Oval.htmlItems

Polygon.htmlItems

Rectangle.htmlItems

SplineItem.htmlItems

Jongware, 29-Apr-2012 v3.0.3iContents :: Index