cut

RichEditCommands.insertRtf Property

Gets a command to add RTF formatted content at the specified position.

Declaration

readonly insertRtf: InsertRtfCommand

Property Value

Type Description
InsertRtfCommand

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

Remarks

Call the execute(rtfText, position) 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 insertPosition = 2;
var subDocumentId = richEdit.document.mainSubDocument.id;
var callbackFunc = function (interval, isRtfValid) {}
richEdit.commands.insertRtf.execute(RTFstring, insertPosition);
richEdit.commands.insertRtf.execute(RTFstring, insertPosition, subDocumentId);
richEdit.commands.insertRtf.execute(RTFstring, insertPosition, subDocumentId, callbackFunc);
See Also