EditLive! for XML JavaScript Constructor

Description

This method creates an instance of an Ephox EditLive! for XML Javascript object.

Note

This method only applies for EditLive! for XML JavaScript integrations.

Syntax

JavaScript

new EditLiveXML(strName, intWidth, intHeight);

Parameters

strName

A unique string identifier for this instance of EditLive! for XML.

This is a required parameter.

intWidth

An integer specifying the width of the applet when displayed.

This is a required parameter.

intWidth

An integer specifying the height of the applet when displayed.

This is a required parameter.

Examples

Example 16.1. JavaScript EditLive! Constructor Scripting Example

The following code creates an EditLive! for XML object and assigns the identifier editlivejs to the JavaScript variable. The object has a unique name of ELApplet1, a width of 700 pixels and a height of 400 pixels.

var editlive1;
editlivejs = new EditLiveXML("ELApplet1","700","400");

Remarks

The constructor must be called before any operations can occur on the EditLive! for XML object.

Ephox recommends setting the width and height in pixels, as on Macintosh machines, if these values are set as percentages and the Web browser window is resized, EditLive! for XML will not be resized with the window.