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