← すべてのドキュメント

exec_command と exec_command_* イベント

exec_command_* イベントは、ExecCommand が実行されるたびに発生します。

exec_command_newdoc のような個別のイベントは、そのコマンドが実行されたときに発生します。

構文

function(state,cmd,value)

使用例

editor1.attachEvent("exec_command_newdoc", function (state, cmd, value) {
    state.returnValue = true;//handled, don't execute default action
    this.setHTMLCode("<p>NewDoc...</p>");
});