Examples
editor.attachEvent()
Attaches an event handler that is executed.
Syntax
editor.attachEvent(eventName,eventHandler)
eventName
Type: String
Specifies the name of the event to be called.
eventHandler
Type: function
A function to execute when the event is triggered.
Example:
editor1.attachEvent("exec_command_newdoc", function (state, cmd, value) {
state.returnValue = true;//handled, don't execute default action
this.setHTMLCode("<p>New Doc...</p>");
});