Adobe InDesign CS5 Server (7.0) Object Model JS: BuildingBlock

InDesign Server CS5

Class

BuildingBlock

 A cross reference building block object.

QuickLinks

addEventListener, getElements, remove, removeEventListener, toSource, toSpecifier

Hierarchy

CrossReferenceFormat
BuildingBlock
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
appliedCharacterStyleCharacterStyle r/wCharacter style to be applied to the building block.
appliedDelimiterstring r/wDelimiter character for paragraph text and full paragraph building blocks. It is ignored for other types of building blocks.
blockTypeBuildingBlockTypes:
BuildingBlockTypes.CUSTOM_STRING_BUILDING_BLOCK
BuildingBlockTypes.FILE_NAME_BUILDING_BLOCK
BuildingBlockTypes.CHAPTER_NUMBER_BUILDING_BLOCK
BuildingBlockTypes.PAGE_NUMBER_BUILDING_BLOCK
BuildingBlockTypes.FULL_PARAGRAPH_BUILDING_BLOCK
BuildingBlockTypes.PARAGRAPH_NUMBER_BUILDING_BLOCK
BuildingBlockTypes.PARAGRAPH_TEXT_BUILDING_BLOCK
BuildingBlockTypes.BOOKMARK_NAME_BUILDING_BLOCK
r/wType of the building block.
customTextstring r/wBuilding block custom text. Currently this is only useful in custom string building block. It is ignored for other types of building blocks.
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
includeDelimiterbool r/wIf true, the source generated for the building block includes the delimiter. It is ignored if no delimiter is specified on the building block.
indexnumber readonlyThe index of the BuildingBlock within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
parentCrossReferenceFormat readonlyThe parent of the BuildingBlock (a CrossReferenceFormat).
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)

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

void remove ()
Deletes the BuildingBlock.

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)

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

string toSpecifier ()
Retrieves the object specifier.

Used in:

BuildingBlock BuildingBlocks.nextItem (obj: BuildingBlock)

BuildingBlock BuildingBlocks.previousItem (obj: BuildingBlock)

Return

Array of BuildingBlock BuildingBlock.getElements ()

BuildingBlock BuildingBlocks.[] (index: number)

BuildingBlock BuildingBlocks.add (blockType: BuildingBlockTypes[, appliedCharacterStyle: CharacterStyle][, customText: string][, withProperties: Object])

BuildingBlock BuildingBlocks.anyItem ()

Array of BuildingBlock BuildingBlocks.everyItem ()

BuildingBlock BuildingBlocks.firstItem ()

BuildingBlock BuildingBlocks.item (index: varies)

Array of BuildingBlock BuildingBlocks.itemByRange (from: varies, to: varies)

BuildingBlock BuildingBlocks.lastItem ()

BuildingBlock BuildingBlocks.middleItem ()

BuildingBlock BuildingBlocks.nextItem (obj: BuildingBlock)

BuildingBlock BuildingBlocks.previousItem (obj: BuildingBlock)

Jongware, 23-Mar-2011 v3.0.3dContents :: Index