Skip to main content

TextWhizzRange

Classes

TextWhizzRange

Implements

Constructors

Constructor
new TextWhizzRange(textRange): TextWhizzRange;
Parameters
ParameterType
textRangeTextRange
Returns

TextWhizzRange

Accessors

isEmpty
Get Signature
get isEmpty(): boolean;

Indicates that the text range is empty (starting position is the same as ending position).

Returns

boolean

Indicates that the text range is empty (starting position is the same as ending position).

Implementation of

ITextRange.isEmpty

isValid
Get Signature
get isValid(): boolean;

Indicates that the original text still exists and was not modified.

Returns

boolean

Indicates that the original text still exists and was not modified.

Implementation of

ITextRange.isValid

Methods

getEndPosition()
getEndPosition(): IPositionInText;

Returns the end position of text range.

Returns

IPositionInText

Implementation of

ITextRange.getEndPosition

getEntry()
getEntry(): TextRange;
Returns

TextRange

getFormattedText()
getFormattedText(): string;

Returns the formatted text of text range.

Returns

string

Implementation of

ITextRange.getFormattedText

getLeftPosition()
getLeftPosition(): IPositionInText;

Returns the left position of text range.

Returns

IPositionInText

Implementation of

ITextRange.getLeftPosition

getParagraphIndexes()
getParagraphIndexes(): number[];

Returns the indexes of paragraphs within a text range.

Returns

number[]

Remarks

Indexes are ordered from lowest to highest.

Implementation of

ITextRange.getParagraphIndexes

getPlainText()
getPlainText(): string;

Returns the plain text (without formatting) of text range.

Returns

string

Implementation of

ITextRange.getPlainText

getRightPosition()
getRightPosition(): IPositionInText;

Returns the right position of text range.

Returns

IPositionInText

Implementation of

ITextRange.getRightPosition

getStartPosition()
getStartPosition(): IPositionInText;

Returns the start position of text range.

Returns

IPositionInText

Implementation of

ITextRange.getStartPosition

isEqualTo()
isEqualTo(anotherRange): boolean;

Compares the current text range with another.

Parameters
ParameterTypeDescription
anotherRangeITextRangeanother text range.
Returns

boolean

true if the ranges match, false otherwise.

Implementation of

ITextRange.isEqualTo

createEntry()
static createEntry(
textWhizz,
start,
end): TextWhizzRange;
Parameters
ParameterType
textWhizzany
startTextPosition
endTextPosition
Returns

TextWhizzRange

Was this page helpful?