EditLive! 9 Documentation : plugin

This element defines the information required to load a single plugin. 

Plug-in Element Tree Structure


   <!-- configuration settings -->

Child Elements

<advancedapis (Applet)>

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!.


Additional Javascript files can be applied to the webpage loading EditLive! by using this element.

Optional Attributes


This attribute defines how java classes (defined in <advancedapis (Applet)>) and Javascript files (defined in <script>) are loaded by EditLive!:

  • immediate- EditLive! will not load until each specified java class/classes and/or Javascript file has been cached and is ready for use by the editor.
    • 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.

      Only use lazy when implementing java classes you want loaded when the user selects a specified menu item. If you want the functionality found in your specified java classes or Javascript files available immediately, use immediate.

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

<?xml version="1.0" encoding="US-ASCII" ?> 
<plugin load="immediate">
       <advancedapis jar="myPlugin.jar" class="MyPlugin" />
                  <customMenuItem name="plugin" action="raiseEvent" value="displayDialog" text="Display Dialog" imageURL="images/small_logo.gif"/> 

This plugin can be loaded using a <plugin> element, with a url attribute, nested in the Configuration File's <Plugins> element:

        <plugin url="http://mysever/mypluginsdir/myPlugin.xml" />        

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!.

          <plugin name="imageEditor" />
          <plugin name="tableToolbar" />


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!.

var editlive = EditLiveJava("ELApplet", 700, 400);

See Also