Back to Devexpress

RichEditCommands.insertText Property

aspnet-js-richeditcommands-dceccd98.md

latest1.6 KB
Original Source

RichEditCommands.insertText Property

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

Declaration

ts
get insertText(): InsertTextCommand

Property Value

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

javascript
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

RichEditCommands Class

RichEditCommands Members