Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

에디터 내부에 정의된 액션을 실행합니다'It executes the actions defined inside the editor.

Parameters:

Name

Type

Description

actionNameString

action 이름name

args각 action별 parameters
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:

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

...