Adobe InDesign CS2 (4.0) Object Model JS: ParagraphStyles

InDesign CS2

Class

ParagraphStyles

 A collection of paragraph styles.

QuickLinks

add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

ParagraphStyle add ([withProperties: Object])
Creates a new ParagraphStyle.

ParameterTypeDescription
withPropertiesObjectInitial values for properties of the new ParagraphStyle (Optional)

ParagraphStyle anyItem ()
Returns any ParagraphStyle in the collection.

number count ()
Displays the number of elements in the ParagraphStyle.

Array of ParagraphStyle everyItem ()
Returns every ParagraphStyle in the collection.

ParagraphStyle firstItem ()
Returns the first ParagraphStyle in the collection.

ParagraphStyle item (index: any)
Returns the ParagraphStyle with the specified index or name.

ParameterTypeDescription
indexLong
String
The index or name. Can accept: Long or String.

ParagraphStyle itemByID (id: number)
Returns the ParagraphStyle with the specified ID.

ParameterTypeDescription
idnumberThe ID.

ParagraphStyle itemByName (name: string)
Returns the ParagraphStyle with the specified name.

ParameterTypeDescription
namestringThe name.

Array of ParagraphStyle itemByRange (from: any, to: any)
Returns the ParagraphStyles within the specified range.

ParameterTypeDescription
fromLong
ParagraphStyle
String
The ParagraphStyle, index, or name at the beginning of the range. Can accept: ParagraphStyle, Long or String.
toLong
ParagraphStyle
String
The ParagraphStyle, index, or name at the end of the range. Can accept: ParagraphStyle, Long or String.

ParagraphStyle lastItem ()
Returns the last ParagraphStyle in the collection.

ParagraphStyle middleItem ()
Returns the middle ParagraphStyle in the collection.

ParagraphStyle nextItem (obj: ParagraphStyle)
Returns the ParagraphStyle whose index follows the specified ParagraphStyle in the collection.

ParameterTypeDescription
objParagraphStyleThe ParagraphStyle whose index comes before the desired ParagraphStyle.

ParagraphStyle previousItem (obj: ParagraphStyle)
Returns the ParagraphStyle with the index previous to the specified index.

ParameterTypeDescription
objParagraphStyleThe index of the ParagraphStyle that follows the desired ParagraphStyle.

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

Element of

Application.paragraphStyles

Document.paragraphStyles

Jongware, 27-Jun-2010 v3.0.3dContents :: Index