addEditorEvent

Availability: >= 3.0

Type: Object Method

Description: Registers a new Editor Event handler.

Syntax:

editor.addEditorEventstring eventname, function function );

An Editor Event is a JavaScript function that is called when an event occurs within the editor. 

Parameters:

eventname
The name of the editor event that should trigger this function.

function
The JavaScript function to be called when the event is triggered. 

Example:

WPro.editors['editorName'].addEditorEvent('enterSource', function(editor) { alert('You have just entered source view!'); } );

See also:

triggerEditorEvent