Back to Website
Show / Hide Table of Contents

Interface ITextHandler

Handler for performing simple operations with text content.

Package: @aurigma/design-atoms-text

Properties

textChangeEvent

Text content change event.

Declaration
textChangeEvent: EventObject<void>;
Property Value
Type Description
EventObject<void>

Text content change event.

Methods

deleteAllText()

Deletes all text.

Declaration
deleteAllText(): IPositionInText;
Returns
Type Description
IPositionInText

deleteTextByRange(textRange)

Deletes text by range

Declaration
deleteTextByRange(textRange: ITextRange): IPositionInText;
Parameters
Type Name Description
ITextRange textRange

text range.

Returns
Type Description
IPositionInText

deleteTextToDirection(direction)

Deletes the selected text or character relative to the current cursor position.

Declaration
deleteTextToDirection(direction: MoveDirectionType): IPositionInText | null;
Parameters
Type Name Description
MoveDirectionType direction

direction of text deletion.

Returns
Type Description
IPositionInText | null

getAllText()

Returns all text.

Declaration
getAllText(): ITextRange;
Returns
Type Description
ITextRange

getFormattedText()

Returns formatted text.

Declaration
getFormattedText(): string;
Returns
Type Description
string

getParagraphCount()

Returns paragraph count.

Declaration
getParagraphCount(): number;
Returns
Type Description
number

getParagraphText(paragraphIndex)

Returns the text range of a paragraph by index.

Declaration
getParagraphText(paragraphIndex: any): ITextRange;
Parameters
Type Name Description
any paragraphIndex

paragraph index (from 0).

Returns
Type Description
ITextRange

getTextModel()

Returns the text model.

Declaration
getTextModel(): Text;
Returns
Type Description
Text_2

getTextRangeByPositions(startPosition, endPosition)

Returns the range of text by starting and ending position.

Declaration
getTextRangeByPositions(startPosition: IPositionInText, endPosition: IPositionInText): ITextRange;
Parameters
Type Name Description
IPositionInText startPosition

starting position.

IPositionInText endPosition

ending position.

Returns
Type Description
ITextRange

insertFormattedText(text)

Inserts formatted text relative to the current cursor position.

Declaration
insertFormattedText(text: string): void;
Parameters
Type Name Description
string text

text to insert.

Returns
Type Description
void

insertNewLine()

Inserts a new line relative to the current cursor position.

Declaration
insertNewLine(): void;
Returns
Type Description
void

insertPlainText(text)

Inserts plain text relative to the current cursor position.

Declaration
insertPlainText(text: string): void;
Parameters
Type Name Description
string text

text to insert.

Returns
Type Description
void

setTextFrames(data, isMeasureFrame)

Sets the frame of text.

Declaration
setTextFrames(data: ITextFrameData, isMeasureFrame: boolean): void;
Parameters
Type Name Description
ITextFrameData data

text frame data.

boolean isMeasureFrame

indicates if the frame is needed for further measurement.

Returns
Type Description
void

setTextModel(model)

Sets the text model.

Declaration
setTextModel(model: Text): void;
Parameters
Type Name Description
Text_2 model

text model.

Returns
Type Description
void

setWrappingPath(data)

Sets the wrapping path.

Declaration
setWrappingPath(data: IWrappingPathData): void;
Parameters
Type Name Description
IWrappingPathData data

wrapping path data.

Returns
Type Description
void
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2024 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback