Packagecom.adobe.illustrator
Classpublic class TextRange
InheritanceTextRange Inheritance IllustratorHostObject Inheritance CSHostObject Inheritance flash.utils.Proxy

Since : CS5

A range of characters from a text item.



Public Properties
 PropertyDefined By
  characterAttributes : CharacterAttributes
[read-only] The character properties for the text range.
TextRange
  characterOffset : Number
Offset of the first character of the range from the beginning of the story, in characters.
TextRange
  characters : Characters
[read-only] All the characters in this text range.
TextRange
  characterStyles : CharacterStyles
[read-only] List of referenced character styles in the text range.
TextRange
  contents : String
The text string.
TextRange
 InheritedhostObjectDelegate : HostObject
Getter for the delegate
CSHostObject
  insertionPoints : InsertionPoints
[read-only] All the insertion points in this text range.
TextRange
  kerning : Number
Controls the spacing between two characters (in milli-ems)
TextRange
  length : Number
Length of text range.
TextRange
  lines : Lines
[read-only] All the lines in this text range.
TextRange
  paragraphAttributes : ParagraphAttributes
[read-only] The paragraph properties for the text range.
TextRange
  paragraphs : Paragraphs
[read-only] All the paragraphs in this text range.
TextRange
  paragraphStyles : ParagraphStyles
[read-only] List of referenced paragraph styles in the text range.
TextRange
 Inheritedparent : *
[read-only]
IllustratorHostObject
  story : Story
[read-only] The story of the text range.
TextRange
  textRanges : TextRanges
[read-only] All the text in this text range.
TextRange
  textSelection : Object
[read-only] The selected text (ranges) in the text range.
TextRange
  words : Words
[read-only] All the words in this text range.
TextRange
Public Methods
 MethodDefined By
  
Change the capitalization of text.
TextRange
  
deSelect():void
Deselect the text range.
TextRange
  
duplicate(relativeObject:Object = null, insertionLocation:ElementPlacement = null):TextRange
create a duplicate of the object
TextRange
 Inherited
filterArgsForHBAPI(args:Array):Array
[static] Function to clean up the argument list and put it into a format that makes sense for HBAPI.
CSHostObject
 Inherited
filterSingleObjectForHBAPI(value:Object):Object
[static]
CSHostObject
 Inherited
getClassObjectForName(className:String):HostObject
[static] This returns a "Class" object, meaning, a HostObject that can be used to make static function calls or get static properties
CSHostObject
 Inherited
getSpecialTranslation(className:String, ho:HostObject, expectedReturnType:Class, ownerName:String):*
[static]
CSHostObject
 Inherited
hostCall(name:String, expectedReturnType:Class, rawargs:Array):*
Encapsulates a function call to the host
CSHostObject
 Inherited
hostCallStatic(className:String, methodName:String, expectedReturnType:Class, rawargs:Array):*
[static] Implements a safe call of a static method on the host
CSHostObject
 Inherited
hostGet(name:String, expectedReturnType:Class):*
Encapsulates a property get to the host
CSHostObject
 Inherited
hostGetIndex(idx:Object, expectedReturnType:Class):*
Encapsulates a indexed get to the host
CSHostObject
 Inherited
hostGetStatic(className:String, propertyName:String, expectedReturnType:Class):*
[static] Implements a safe get of a static property on the host Used by for instance, all the enum implementations.
CSHostObject
 Inherited
hostSet(name:String, rawvalue:*):void
Encapsulates a property set to the host
CSHostObject
 Inherited
hostSetStatic(className:String, propertyName:String, rawvalue:*):*
[static] Implements a safe set of a static property on the host
CSHostObject
 Inherited
isDescendedFrom(clz:Class, ancClass:Class):Boolean
[static] Efficiently determines whether or not one class descends from another in inheritance hierarchy- class relationships are cached by the ClassUtils implementation- (uses org.as3commons lib to quickly discover class hierarchy.
CSHostObject
  
move(relativeObject:Object, insertionLocation:ElementPlacement):void
move the object
TextRange
  
remove():void
delete the object
TextRange
 Inherited
replaceDefaultArgs(args:Array, defaultArgs:Array):Array
Function to tidy up arguments prior to call.
CSHostObject
  
select(addToDocument:Boolean = false):void
Select the text range.
TextRange
 Inherited
wrapReturnedHostObject(rawObject:Object, expectedReturnType:Class, client:CSHostObject, propertyName:String):*
[static] Method used on static/normal get/ hostcalls
CSHostObject
Protected Methods
 MethodDefined By
 Inherited
createWithArgs(args:Array):void
CSHostObject
 Inherited
hostCreate(args:Array):void
CSHostObject
Property Detail
characterAttributesproperty
characterAttributes:CharacterAttributes  [read-only]

Since : CS5

The character properties for the text range.


Implementation
    public function get characterAttributes():CharacterAttributes
characterOffsetproperty 
characterOffset:Number

Since : CS5

Offset of the first character of the range from the beginning of the story, in characters.


Implementation
    public function get characterOffset():Number
    public function set characterOffset(value:Number):void
charactersproperty 
characters:Characters  [read-only]

Since : CS5

All the characters in this text range.


Implementation
    public function get characters():Characters
characterStylesproperty 
characterStyles:CharacterStyles  [read-only]

Since : CS5

List of referenced character styles in the text range.


Implementation
    public function get characterStyles():CharacterStyles
contentsproperty 
contents:String

Since : CS5

The text string.


Implementation
    public function get contents():String
    public function set contents(value:String):void
insertionPointsproperty 
insertionPoints:InsertionPoints  [read-only]

Since : CS5

All the insertion points in this text range.


Implementation
    public function get insertionPoints():InsertionPoints
kerningproperty 
kerning:Number

Since : CS5

Controls the spacing between two characters (in milli-ems)


Implementation
    public function get kerning():Number
    public function set kerning(value:Number):void
lengthproperty 
length:Number

Since : CS5

Length of text range. ( minimum 0 )


Implementation
    public function get length():Number
    public function set length(value:Number):void
linesproperty 
lines:Lines  [read-only]

Since : CS5

All the lines in this text range.


Implementation
    public function get lines():Lines
paragraphAttributesproperty 
paragraphAttributes:ParagraphAttributes  [read-only]

Since : CS5

The paragraph properties for the text range.


Implementation
    public function get paragraphAttributes():ParagraphAttributes
paragraphsproperty 
paragraphs:Paragraphs  [read-only]

Since : CS5

All the paragraphs in this text range.


Implementation
    public function get paragraphs():Paragraphs
paragraphStylesproperty 
paragraphStyles:ParagraphStyles  [read-only]

Since : CS5

List of referenced paragraph styles in the text range.


Implementation
    public function get paragraphStyles():ParagraphStyles
storyproperty 
story:Story  [read-only]

Since : CS5

The story of the text range.


Implementation
    public function get story():Story
textRangesproperty 
textRanges:TextRanges  [read-only]

Since : CS5

All the text in this text range.


Implementation
    public function get textRanges():TextRanges
textSelectionproperty 
textSelection:Object  [read-only]

Since : CS5

The selected text (ranges) in the text range.


Implementation
    public function get textSelection():Object
wordsproperty 
words:Words  [read-only]

Since : CS5

All the words in this text range.


Implementation
    public function get words():Words
Method Detail
changeCaseTo()method
public function changeCaseTo(type:CaseChangeType):void

Since : CS5

Change the capitalization of text.

Parameters

type:CaseChangeType — (com.adobe.illustrator.CaseChangeType) The type of case.

deSelect()method 
public function deSelect():void

Since : CS5

Deselect the text range.

duplicate()method 
public function duplicate(relativeObject:Object = null, insertionLocation:ElementPlacement = null):TextRange

Since : CS5

create a duplicate of the object

Parameters

relativeObject:Object (default = null) — (Object)
 
insertionLocation:ElementPlacement (default = null) — (com.adobe.illustrator.ElementPlacement) ( default: ElementPlacement.INSIDE )

Returns
TextRange
move()method 
public function move(relativeObject:Object, insertionLocation:ElementPlacement):void

Since : CS5

move the object

Parameters

relativeObject:Object — (Object)
 
insertionLocation:ElementPlacement — (com.adobe.illustrator.ElementPlacement)

remove()method 
public function remove():void

Since : CS5

delete the object

select()method 
public function select(addToDocument:Boolean = false):void

Since : CS5

Select the text range.

Parameters

addToDocument:Boolean (default = false) — (Boolean) Whether to add the text range to the document text selection. ( default: false )