Availability: >= 3.0
Type: Object Method
$editor->addJSPlugin( str $pluginName [, string $filename] );
When the editor is displayed in the browser it will load the specified plugin.
The name of the plugin to load.
If you specify a filename then WysiwygPro will load that file using a script tag. The file must exist within a plugin folder that has the same name as the plugin. Loading the plugin file is optional because the code for the plugin could have been added already using a script tag.
Loading a plugin using a file:
$editor->addJSPlugin( 'myPlugin', 'plugin.js' );
plugin.js would need to be located here:
Example 2, loading a plugin without creating a script file:
// Output the code for the plugin rather than placing it in an external file
// load the plugin
$editor->addJSPlugin( 'myPlugin' );