RichEditCommands.insertRtf Property

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


readonly insertRtf: InsertRtfCommand

Property Value

Type Description

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


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 =;
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