BuildingBlock

A cross reference building block object.

Methods:

addEventListener, getElements, remove, removeEventListener, toSource, toSpecifier

Objects:

Boolean, BuildingBlockTypes, CharacterStyle, EventListeners, Events, Number, Object, String

Property Listing

Property

Type

Access

Description

appliedCharacterStyle

CharacterStyle

read/write

Character style to be applied to the building block.

appliedDelimiter

String

read/write

Delimiter character for paragraph text and full paragraph building blocks. It is ignored for other types of building blocks.

blockType

BuildingBlockTypes

BuildingBlockTypes.BOOKMARK_NAME_BUILDING_BLOCK

BuildingBlockTypes.CHAPTER_NUMBER_BUILDING_BLOCK

BuildingBlockTypes.CUSTOM_STRING_BUILDING_BLOCK

BuildingBlockTypes.FILE_NAME_BUILDING_BLOCK

BuildingBlockTypes.FULL_PARAGRAPH_BUILDING_BLOCK

BuildingBlockTypes.PAGE_NUMBER_BUILDING_BLOCK

BuildingBlockTypes.PARAGRAPH_NUMBER_BUILDING_BLOCK

BuildingBlockTypes.PARAGRAPH_TEXT_BUILDING_BLOCK

read/write

Type of the building block.

customText

String

read/write

Building block custom text. Currently this is only useful in custom string building block. It is ignored for other types of building blocks.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

includeDelimiter

Boolean

read/write

If true, the source generated for the building block includes the delimiter. It is ignored if no delimiter is specified on the building block.

index

Number

readonly

The index of the BuildingBlock within its containing object.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

parent

CrossReferenceFormat

readonly

The parent of the BuildingBlock (a CrossReferenceFormat).

properties

Object

read/write

A property that allows setting of several properties at the same time.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

BuildingBlock getElements ()

Resolves the object specifier, creating an array of object references.

undefined remove ()

Deletes the BuildingBlock.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

String toSource ()

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

String toSpecifier ()

Retrieves the object specifier.

Object of

Event.parent

EventListener.parent

MutationEvent.parent

Return

BuildingBlocks.add()

BuildingBlock.getElements()

BuildingBlocks.anyItem()

BuildingBlocks.everyItem()

BuildingBlocks.nextItem()

BuildingBlocks.previousItem()

BuildingBlocks.item()

BuildingBlocks.[]()

BuildingBlocks.itemByRange()

BuildingBlocks.firstItem()

BuildingBlocks.lastItem()

BuildingBlocks.middleItem()