This element defines the information required to load a single plugin.
Plug-in Element Tree Structure
This element defines what Java classes the plugin will load.
The menu element defines the menu items which will appear under the Plugins menu in EditLive!.
- Example: Your plugin creates custom rendering for custom HTML tags appearing in your content. Because these tags may appear in the default content for EditLive!, the plugin is required as soon as the editor loads. To ensure this plugin code is instantly available to EditLive!, use the immediate load attribute.
- background- EditLive! will load as normal, caching the required java class/classes in the background.
- Example: Your plugin may be designed to launch a complex dialog for restructuring the current HTML stored in EditLive!. Due to its complexity, the plugin size is quite large and hence will take a significant amount of time to cache and load into EditLive!. It would be undesirable to use immediate because this would substantially increase the load time for EditLive!. background can be used to ensure the editor loads as normal, providing the plugin functionality to the user a short time after the editor has loaded.
- lazy- These java classes will not be cached and utilized by the editor until the user selects a menu item from the Plugins menu that requires these java classes.
Example: Your plugin defines a menu item that, once selected, inserts a HTML fragment into EditLive!. The plugin size is quite small, meaning it will not take long to both cache and load. The lazyload value could be used to only load the plugin when the user tries to utilize this functionality.
Default Value: immediate
This attribute is used when a plugin is loaded into the editor via the <Plugins> Configuration File element.
The url attribute is used to specify the location of an external XML file that specifies the details of an EditLive! plugin.
The following file myPlugin.xml sits on a server at the URL http://mysever/mypluginsdir/myPlugin.xml
This plugin can be loaded using a <plugin> element, with a url attribute, nested in the Configuration File's <Plugins> element:
EditLive! comes packaged with several plugins. These plugins can be initialized by simply specifying a name attribute on a plugin element resident in an EditLive! configuration file.
EditLive! for Java accepts the following plugin name attributes:
- imageEditor - enables the Image Editor functionality.
- tableToolbar - allows developers to specify an <inlineToolbar> to appear for TABLE elements.
- accessibility - enables the Accessibility As You Type functionality.
- BrokenHyperlinkReport - enables the Broken Hyperlink Report functionality.
- autosave - enables the Autosave functionality.
- rtfpaste - provides the ability to import .rtf when using Apple OSX. The RTF clipboard flavor on OSX will be supported, allowing copy and paste of rich content from sources such as Safari.
- spelling - enables the Spell Check functionality.
The following configuration file excerpt will load the image editor and the inline table toolbar functionality into an instance of EditLive!.
Multiple <plugin> elements can be applied to one plug-in XML file or <Plugins> Configuration File element. You can also define several plug-in XML files and reference each using several calls to the addPlugin Method.
The following example specifies two plugin XML files for use with an instance of EditLive!.