GetRtfCommand.execute(interval, callback) Method
Executes the GetRtfCommand command by applying the specified settings.
May result in taking no action if the command’s state does not allow command execution. Use the object’s getState method to check the command state.
Declaration
execute(
interval: Interval,
callback: (arg: string) => void,
subDocumentId?: number
): boolean
Parameters
Name | Type | Description |
---|---|---|
interval | Interval | An object specifying the required interval in the specified sub-document. |
callback | (arg: string) => void | A function that passes the RTF formatted string as a parameter. |
subDocumentId | number | A value identifying the target sub-document. |
Returns
Type | Description |
---|---|
boolean | A Boolean value identifying whether method execution was successful or failed. |
Remarks
The execute method checks the command state (obtained using the getState method) before executing, and decides whether the action can be performed.
Usage example:
var interval = new ASPx.Interval(2,3);
var callbackFunc = function (RTFstring) {}
var subDocumentId = richEdit.document.mainSubDocument.id;
richEdit.commands.getRtf.execute(interval, callbackFunc, subDocumentId);
See Also