Class TextHandler
Handler for performing simple operations with text content.
Remarks
Constructors
(constructor)(tw, textMeasurerHolder, colorParser)
Constructs a new instance of the TextHandler
class
Declaration
constructor(tw: ITextWhizzHolder, textMeasurerHolder: ITextMeasurerHolder, colorParser: IColorParser);
Parameters
Properties
textChangeEvent
Text content change event.
Declaration
get textChangeEvent(): EventObject<void>;
Property Value
Type |
Description |
EventObject<void> |
Text content change event.
|
Methods
deleteAllText()
Declaration
deleteAllText(): IPositionInText;
Returns
deleteTextByRange(textRange)
Declaration
deleteTextByRange(textRange: ITextRange): IPositionInText;
Parameters
Returns
deleteTextToDirection(directionType)
Declaration
deleteTextToDirection(directionType: MoveDirectionType): IPositionInText | null;
Parameters
Returns
getAllText()
Declaration
getAllText(): ITextRange;
Returns
getFormattedText()
Declaration
getFormattedText(): string;
Returns
getParagraphCount()
Declaration
getParagraphCount(): number;
Returns
getParagraphText(paragraphIndex)
Declaration
getParagraphText(paragraphIndex: any): ITextRange;
Parameters
Type |
Name |
Description |
any |
paragraphIndex |
|
Returns
getTextModel()
Declaration
Returns
getTextRangeByPositions(startPosition, endPosition)
Declaration
getTextRangeByPositions(startPosition: IPositionInText, endPosition: IPositionInText): ITextRange;
Parameters
Returns
insertFormattedText(text)
Declaration
insertFormattedText(text: string): void;
Parameters
Type |
Name |
Description |
string |
text |
|
Returns
insertNewLine()
Declaration
Returns
insertPlainText(text)
Declaration
insertPlainText(text: string): void;
Parameters
Type |
Name |
Description |
string |
text |
|
Returns
setTextFrames(data, isMeasureFrame)
Declaration
setTextFrames(data: ITextFrameData, isMeasureFrame: boolean): void;
Parameters
Returns
setTextModel(model)
Declaration
setTextModel(model: Text): void;
Parameters
Type |
Name |
Description |
Text_2 |
model |
|
Returns
setWrappingPath(data)
Declaration
setWrappingPath(data: IWrappingPathData): void;
Parameters
Returns