Skip to main content
A newer version of this page is available. .
cut

RichEditCommands.insertText Property

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

Declaration

insertText: InsertTextCommand

Property Value

Type Description
InsertTextCommand

A InsertTextCommand object that provides methods for executing the command and checking its state.

Remarks

You can invoke this command by calling the execute method.

The execute method checks the command state (obtained using the getState method) before executing, and decides whether the action can be performed. The execute and getState methods are members of the InsertTextCommand class.

Usage example:


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.)

See Also