Functiondijit.Editor.addPlugin

dojo.require("dijit.Editor");
defined in dijit/Editor.js

takes a plugin name as a string or a plugin instance and adds it to the toolbar and associates it with this editor instance. The resulting plugin is added to the Editor's plugins array. If index is passed, it's placed in the plugins array at that index. No big magic, but a nice helper for passing in plugin names via markup.

Usage

function (/*String|Object*/ plugin, /*Integer?*/ index) (view source)
parametertypedescription
pluginString|ObjectString args object or plugin instance. Required. args: This object will be passed to the plugin constructor.
indexIntegerOptional. optional. Used when creating an instance from something already in this.plugins. Ensures that the new instance is assigned to this.plugins at that index.