Page tree
Skip to end of metadata
Go to start of metadata

EditLive!'s plugin functionality is only supported with an EditLive! Enterprise Edition license.

This property is used to specify a plugin for use with EditLive!. See the Creating and Using Plugins in the Applet article in the Developer Guide for more information on using plugins.

This property differs from the AddPlugin load-time property in that the Plugin XML is passed through as a string rather than the location of the .xml file containing the plugin specifications.

Using AddPluginAsText will result in faster plugin loading times than AddPlugin.

This property can be called any number of times for an instance of EditLive!.

Syntax

JavaScript
editliveInstance.addPluginAsText(xmlString, [baseURL]);

Parameters

xmlString

The Plugin XML represented as a string.

The string passed to the JavaScript addPluginAsText property must be URL encoded. It is recommended that a server-side URL encoding function be used if available as the JavaScript URL encoding functions do not fully comply with the URL encoding standard.

baseURL

This parameter is optional.

Any relative URLs found in the Plugin XML (defined in xmlString) will be resolved against this base URL.

If no base URL is specified, relative URLs will resolve against the current URL for the page displaying the editor. For example, if EditLive! is being displayed on the page http://myserver/edit/editPage.html, the base URL will be http://myserver/edit.

Examples

The following code would load a plugin based on the Plugin XML passed as the string argument.

JavaScript
editlivejs.addPluginAsText("%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22US-AS...");

Only specify one <plugin> element per call to addPluginAsText.

See Also

  • No labels