Home   Pricing

exec_command and exec_command_* event

The exec_command_* event is fired when any ExecCommand is executed.

The exec_command_* event is raised when one particular ExecCommand is executed (exec_command_newdoc).

Syntax

function(state,cmd,value)

Example:

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