Skip to main content

InsertTextCmd

Classes

InsertTextCmd

The command to insert plain text relative to the current cursor position.

Remarks

if there is selected text, it will be deleted.

Implements

Constructors

Constructor
new InsertTextCmd(textManager, initData): InsertTextCmd;
Parameters
ParameterType
textManagerITextManager
initDataInsertTextCmdData
Returns

InsertTextCmd

Accessors

text
Get Signature
get text(): string;
Returns

string

Methods

execute()
execute(): boolean;

Executes the command.

Returns

boolean

true if changes were made, false otherwise.

Implementation of

ICommand.execute


InsertTextCmdData

Data required to initialize the command.

Constructors

Constructor
new InsertTextCmdData(text, isNewLineEnabled): InsertTextCmdData;
Parameters
ParameterType
textstring
isNewLineEnabledboolean
Returns

InsertTextCmdData

Properties

isNewLineEnabled
isNewLineEnabled: boolean;

Indicates that new line insertion is enabled.

text
text: string;

Text for insert.

Was this page helpful?