Skip to main content
cut

RichEditCommands.insertText Property

Gets a command to insert text in place of a selected range.

#Declaration

TypeScript
get insertText(): InsertTextCommand

#Property Value

Type Description
InsertTextCommand

An object that provides methods that execute the command and check its state.

#Remarks

Call the execute(text) method to invoke the command. The method checks the command state (obtained via the getState method) to determine whether the action can be performed.

var subDocumentId = richEdit.document.activeSubDocument.id;
var insertPosition = 75;
var interval = new ASPx.Interval(insertPosition, 0);
richEdit.commands.insertText.execute("an example text", insertPosition, subDocumentId);
richEdit.commands.insertText.execute("an example text", insertPosition);
richEdit.commands.insertText.execute("an example text", interval, subDocumentId);
richEdit.commands.insertText.execute("an example text", interval);
richEdit.commands.insertText.execute("an example text");

The command allows inserting paragraphs of text. The command doesn’t insert special symbols (section breaks, page breaks, etc.)

Refer to the following section for more information: Client Commands.

See Also