Adobe InDesign CS5.5 (7.5) Object Model JS: Bookmark

InDesign CS5.5

Class

Bookmark

 A bookmark.

QuickLinks

addEventListener, extractLabel, getElements, insertLabel, move, remove, removeEventListener, showBookmark, toSource, toSpecifier

Hierarchy

Bookmark | Document
Bookmark
Bookmark | Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
bookmarksBookmarks Bookmark readonlyA collection of bookmarks.
destinationHyperlinkExternalPageDestinationHyperlinkPageDestination
HyperlinkTextDestination
Page
readonlyThe destination that the hyperlink points to. Can return: HyperlinkTextDestination, HyperlinkPageDestination, HyperlinkExternalPageDestination or Page.
eventListenersEventListeners EventListener readonlyA collection of event listeners.
eventsEvents Event readonlyA collection of events.
idnumber readonlyThe unique ID of the Bookmark.
indentnumber readonlyThe indent level of the bookmark.
indexnumber readonlyThe index of the Bookmark within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
namestring r/wThe name of the Bookmark.
parentBookmark
Document
readonlyThe parent of the Bookmark (a Document or Bookmark).
propertiesObject r/wA property that allows setting of several properties at the same time.

Methods

Instances

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

Array of Bookmark getElements ()
Resolves the object specifier, creating an array of object references.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

Bookmark move ([to: LocationOptions=LocationOptions.AT_END][, reference: varies])
Moves the bookmark to the specified location.

ParameterTypeDescription
toLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
The bookmark location relative to the reference object or within the containing object. (Optional) (default: LocationOptions.AT_END)
referenceBookmark
Bookmark
Document
The reference object. Note: Required when the to parameter specifies before or after. Can accept: Bookmark, Document or Bookmark. (Optional)

void remove ()
Deletes the Bookmark.

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

void showBookmark ()
Go to the bookmark.

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

string toSpecifier ()
Retrieves the object specifier.

Element of

Bookmark.parent

GotoAnchorBehavior.anchorItem

Used in:

Bookmark Bookmarks.nextItem (obj: Bookmark)

Bookmark Bookmarks.previousItem (obj: Bookmark)

Return

Array of Bookmark Bookmark.getElements ()

Bookmark Bookmark.move ([to: LocationOptions=LocationOptions.AT_END][, reference: varies])

Bookmark Bookmarks.[] (index: number)

Bookmark Bookmarks.add (destination: varies[, withProperties: Object])

Bookmark Bookmarks.anyItem ()

Array of Bookmark Bookmarks.everyItem ()

Bookmark Bookmarks.firstItem ()

Bookmark Bookmarks.item (index: varies)

Bookmark Bookmarks.itemByID (id: number)

Bookmark Bookmarks.itemByName (name: string)

Array of Bookmark Bookmarks.itemByRange (from: varies, to: varies)

Bookmark Bookmarks.lastItem ()

Bookmark Bookmarks.middleItem ()

Bookmark Bookmarks.nextItem (obj: Bookmark)

Bookmark Bookmarks.previousItem (obj: Bookmark)

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