IndexingIndex

An index.

Instance Properties

Name Description Access
allTopics Topic The topics in the specified index section. read-only
eventListeners EventListeners A collection of event listeners. read-only
events Events A collection of events. read-only
id number The unique ID of the Index. read-only
index number The index of the Index within its containing object. read-only
indexSections IndexSections A collection of index sections. read-only
isValid bool Returns true if the object specifier resolves to valid objects. read-only
label string A property that can be set to any string. read-write
name string The name of the Index; this is an alias to the Index's label property. read-write
parent Document The parent of the Index (a Document). read-only
properties Object A property that allows setting of several properties at the same time. read-write
topics Topics A collection of index topics. read-only

Methods

addEventListener(
eventType, handler ​[, captures])
 → EventListener
capitalize(
[capitalizationOption])
extractLabel(
key)
 → string
generate(
on ​[, placePoint] ​[, destinationLayer] ​[, autoflowing] ​[, includeOverset])
 → Story
getElements(
)
 → Index
importTopics(
from)
insertLabel(
key, value)
removeEventListener(
eventType, handler ​[, captures])
 → bool
toSource(
)
 → string
toSpecifier(
)
 → string
update(
)
addEventListener(
eventType, handler ​[, captures=false])
 → EventListener
Adds an event listener.
eventType string The event type.
handler The event handler. Can accept: File or JavaScript Function.
captures bool This parameter is obsolete. (Optional)
capitalize(
[capitalizationOption=IndexCapitalizationOptions.ALL_ENTRIES])
Makes the initial letter for the specified index topic or group of index topics upper case.
capitalizationOption IndexCapitalizationOptions The entry or entries to capitalize. (Optional)
extractLabel(
key)
 → string
Gets the label value associated with the specified key.
key string The key.
generate(
on ​[, placePoint] ​[, destinationLayer] ​[, autoflowing=false] ​[, includeOverset=false])
 → Story
Generates a new index story.
on The spread or page on which to place the story. Can accept: Page, Spread or MasterSpread. (Optional)
placePoint Array<Measurement Unit (Number or String)=any> The coordinates of the upper left corner of the story bounding box, in the format [x, y]. (Optional)
destinationLayer Layer The layer on which to place the story. (Optional)
autoflowing bool If true, allows the story to flow onto subsequent pages if the story does not fit on the specified page. If no subsequent pages exist in the document, creates the necessary pages. (Optional)
includeOverset bool If true, includes topics in overset text in the story. (Optional)
getElements(
)
 → Index
Resolves the object specifier, creating an array of object references.
importTopics(
from)
Imports a list of index topics.
from File The file from which to import the topics.
insertLabel(
key, value)
Sets the label to the value associated with the specified key.
key string The key.
value string The value.
removeEventListener(
eventType, handler ​[, captures=false])
 → bool
Removes the event listener.
eventType string The registered event type.
handler The registered event handler. Can accept: File or JavaScript Function.
captures bool This parameter is obsolete. (Optional)
removeUnusedTopics(
)
Removes all index topics that do not have any index entries.
toSource(
)
 → string
Generates a string which, if executed, will return the Index.
toSpecifier(
)
 → string
Retrieves the object specifier.
update(
)
Updates the index preview pane. Note: Does not update the index.