'It executes the actions defined inside the editor.

Parameters:

Name

Type

Description

actionNameString

action name

args
Parameters for each action


Return:

Type

Attribute

Description

Object

{

    isSuccess: true,

    errorType: null,

    errorMessage: null

}

Results of actions execution

isSuccess: Whether the execution was successful

errorType: Error type when the execution fails

errorMessage: Error message when the execution fails


Example:

var result = editor.execCommand('insertText', 'Hello SynapEditor');
if (!result.isSuccess) {
	console.error(result.errorMessage);
}