@express-document-sdk

Class: ThreadedTextList

ReadOnlyItemList represents an ordered list of API objects that are all children of the same parent node.

Items in a bare ReadOnlyItemList cannot be added, removed, or reordered. The ItemList subclass adds more capabilities, and is most frequently encountered as ArtboardNode.children or GroupNode.children.

Extends

Indexable

[key: number]: object

Constructors

Constructor

new ThreadedTextList(): ThreadedTextList;

Returns

ThreadedTextList

Inherited from

ReadOnlyItemList.constructor

Accessors

length

Get Signature

get length(): number;

Number of items in this list.

Returns

number

Inherited from

ReadOnlyItemList.length

first

Get Signature

get first(): T | undefined;

First item in this list, or undefined if list is empty.

Returns

T | undefined

Inherited from

ReadOnlyItemList.first

last

Get Signature

get last(): T | undefined;

Last item in this list, or undefined if list is empty.

Returns

T | undefined

Inherited from

ReadOnlyItemList.last

Methods

item()

item(index): ThreadedTextNode | undefined;

Returns item at the given index, or undefined if index is out of range.

Parameters

Parameter
Type
Description
index
number
Zero-based index

Returns

ThreadedTextNode | undefined

Inherited from

ReadOnlyItemList.item

[iterator]()

iterator: Iterator<ThreadedTextNode>;

Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator.

Returns

Iterator<ThreadedTextNode>

Inherited from

ReadOnlyItemList.[iterator]

addFrame()

addFrame(geometry?): ThreadedTextNode;

Experimental

data-slots=text
data-variant=warning
IMPORTANT: This is currently experimental only and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the experimentalApis flag to true in the requirements section of the manifest.json.

Parameters

Parameter
Type
Description
geometry?
TextFrameAreaGeometry
The geometry of the threaded text node in pixels (width and height).

Returns

ThreadedTextNode

A new ThreadedTextNode that is part of a threaded text flow.

indexOf()

indexOf(item): number;

Get index of item in list.

Parameters

Parameter
Type
item
ThreadedTextNode

Returns

number

index number, or -1 if item isn't in this list.

Inherited from

ReadOnlyItemList.indexOf

toArray()

toArray(): readonly ThreadedTextNode[];

All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier.

Returns

readonly ThreadedTextNode[]

Inherited from

ReadOnlyItemList.toArray