ITextRange
Interfaces
ITextRange
Properties
isEmpty
isEmpty: boolean;
Indicates that the text range is empty (starting position is the same as ending position).
isValid
isValid: boolean;
Indicates that the original text still exists and was not modified.
Methods
getEndPosition()
getEndPosition(): IPositionInText;
Returns the end position of text range.
Returns
getFormattedText()
getFormattedText(): string;
Returns the formatted text of text range.
Returns
string
getLeftPosition()
getLeftPosition(): IPositionInText;
Returns the left position of text range.
Returns
getParagraphIndexes()
getParagraphIndexes(): number[];
Returns the indexes of paragraphs within a text range.
Returns
number[]
Remarks
Indexes are ordered from lowest to highest.
getPlainText()
getPlainText(): string;
Returns the plain text (without formatting) of text range.
Returns
string
getRightPosition()
getRightPosition(): IPositionInText;
Returns the right position of text range.
Returns
getStartPosition()
getStartPosition(): IPositionInText;
Returns the start position of text range.
Returns
isEqualTo()
isEqualTo(textRange): boolean;
Compares the current text range with another.
Parameters
| Parameter | Type | Description |
|---|---|---|
textRange | ITextRange | another text range. |
Returns
boolean
true if the ranges match, false otherwise.