Adobe Illustrator CS4 Type Library JS: TextRange

Illustrator CS4

Class

TextRange

 A range of characters from a text item.

QuickLinks

changeCaseTo, deSelect, duplicate, move, remove, removeAll, select

Hierarchy

Object
TextRange

Properties

PropertyTypeAccessDescription
characterAttributesCharacterAttributes readonlyThe character properties for the text range.
characterOffsetint r/wOffset of the first character of the range from the beginning of the story, in characters.
characterStylesCharacterStyles readonlyList of referenced character styles in the text range.
charactersCharacters readonlyAll the characters in this text range.
contentsstring r/wThe text string.
insertionPointsInsertionPoints readonlyAll the insertion points in this text range.
kerningint r/wControls the spacing between two characters (in milli-ems)
lengthint (min: 0) r/wLength of text range.
linesLines readonlyAll the lines in this text range.
paragraphAttributesParagraphAttributes readonlyThe paragraph properties for the text range.
paragraphStylesParagraphStyles readonlyList of referenced paragraph styles in the text range.
paragraphsParagraphs readonlyAll the paragraphs in this text range.
parentObject readonlyThe object's container.
storyStory readonlyThe story of the text range.
textRangesTextRanges readonlyAll the text in this text range.
textSelection Array of TextRange readonlyThe selected text (ranges) in the text range.
typenamestring readonlyThe class name of the object.
wordsWords readonlyAll the words in this text range.

Methods

Instances

void changeCaseTo (type: CaseChangeType)
Change the capitalization of text.

ParameterTypeDescription
typeCaseChangeType:
CaseChangeType.UPPERCASE
CaseChangeType.LOWERCASE
CaseChangeType.TITLECASE
CaseChangeType.SENTENCECASE
The type of case.

void deSelect ()
Deselect the text range.

TextRange duplicate (relativeObject: Object, insertionLocation: ElementPlacement)
Duplicate this object.

ParameterTypeDescription
relativeObjectObject
insertionLocationElementPlacement

TextRange move (relativeObject: Object, insertionLocation: ElementPlacement)
Move the object.

ParameterTypeDescription
relativeObjectObject
insertionLocationElementPlacement

void remove ()
Deletes this object.

void removeAll ()
Deletes all elements.

void select ([addToDocument: bool=false])
Select the text range.

ParameterTypeDescription
addToDocumentboolWhether to add the text range to the document text selection. (default: false) (Optional)

Element of

Story.textRange

Story.textSelection

TextFrameItem.textRange

TextFrameItem.textSelection

TextRange.textSelection

Return

TextRange Characters.[] (index: uint)

TextRange Characters.add (contents: string)

TextRange Characters.addBefore (contents: string)

TextRange Characters.getByName (name: string)

TextRange Lines.[] (index: uint)

TextRange Lines.getByName (name: string)

TextRange Paragraphs.[] (index: uint)

TextRange Paragraphs.add (contents: string)

TextRange Paragraphs.addBefore (contents: string)

TextRange Paragraphs.getByName (name: string)

TextRange TextRange.duplicate (relativeObject: Object, insertionLocation: ElementPlacement)

TextRange TextRange.move (relativeObject: Object, insertionLocation: ElementPlacement)

TextRange TextRanges.[] (index: uint)

TextRange TextRanges.getByName (name: string)

TextRange Words.[] (index: uint)

TextRange Words.add (contents: string)

TextRange Words.addBefore (contents: string)

TextRange Words.getByName (name: string)

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