[ enum ] TextAction

Description:

Enum for actions on text components (TextField, TextArea, etc.). To be used in text() method.

Type: number

Properties:

Name Description

Set

Replace all text.

Prepend

Add text at the beginning.

Append

Add text at the end.

Insert

Insert at current caret position.

ReplaceSelection

Replace selected text.

Examples:

Appending text to TextArea component:

let textarea = new TextArea("Hello").text(" World!", TextAction.Append);
// text area will contain text "Hello World!"

Also See: