InDesign Server2025
API 20.5.0.49
Collection of HtmlItem

HtmlItems

A collection of embedded HTML page items.

Properties

NameType AccessDescription
Number readonly The number of objects in the collection.

Methods

HtmlItem

Returns the HtmlItem with the specified index.

index Number The index.
HtmlItem

Creates a new HtmlItem

layer? Layer The layer on which to create the HtmlItem.
at? LocationOptions The location at which to insert the HtmlItem relative to the reference object or within the container object.
reference? Document | Layer | MasterSpread | Page | Spread | PageItem The reference object. Note: Required when the at parameter is before or after. Can accept: Document, Spread, MasterSpread, Page, Layer or PageItem.
withProperties? Object Initial values for properties of the new HtmlItem
HtmlItem

Returns any HtmlItem in the collection.

Number

Displays the number of elements in the HtmlItem.

HtmlItem[]

Returns every HtmlItem in the collection.

HtmlItem

Returns the first HtmlItem in the collection.

HtmlItem

Returns the HtmlItem with the specified index or name.

index LongInteger | String The index or name. Can accept: Long Integer or String.
HtmlItem

Returns the HtmlItem with the specified ID.

id Number The ID.
HtmlItem

Returns the HtmlItem with the specified name.

name String The name.
HtmlItem[]

Returns the HtmlItems within the specified range.

from HtmlItem | LongInteger | String The HtmlItem, index, or name at the beginning of the range. Can accept: HtmlItem, Long Integer or String.
to HtmlItem | LongInteger | String The HtmlItem, index, or name at the end of the range. Can accept: HtmlItem, Long Integer or String.
HtmlItem

Returns the last HtmlItem in the collection.

HtmlItem

Returns the middle HtmlItem in the collection.

HtmlItem

Returns the HtmlItem whose index follows the specified HtmlItem in the collection.

obj HtmlItem The HtmlItem whose index comes before the desired HtmlItem.
HtmlItem

Returns the HtmlItem with the index previous to the specified index.

obj HtmlItem The index of the HtmlItem that follows the desired HtmlItem.
String

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

Object of 5

Properties elsewhere that hold a HtmlItems.