loadPlugin

Availability: >= 3.0

Type: Object Method

Description: Loads a JavaScript API plugin.

Syntax:

editor.loadPluginstring plugin );

Parameters:

plugin
The name of the plugin to load.

The code for the plugin must already be loaded. The plugin itself must be an object.

Once a plugin is loaded you can access it through the editor.plugins object.

Example: 

// The plugin function
function wproPlugin_myPlugin (editor) {
    
editor.addEditorEvent('enterSource', function (editor) {
        
alert('You have just entered source view!');
    });
}

// load the plugin
WPro.editors['myEditor'].loadPlugin('myPlugin');