This method creates an instance of an Ephox EditLive! Javascript object.
This method only applies for EditLive! JavaScript integrations.
Syntax
JavaScript
var editlive = new EditLiveJava(strName, width, height);
Parameter
strName
A unique string identifier for this instance of EditLive!.
This is a required parameter.
width
This parameter will specify the width of the applet when displayed. This parameter can take the form of either:
- An integer representing the width of the applet in pixels (e.g. "200" for 200 pixels), or
- A percentage representing the width the applet consumes within the HTML element the applet is nested (e.g. "50%" for 50 percent).
This is a required parameter.
height
This parameter will specify the height of the applet when displayed. This parameter can take the form of either:
- An integer representing the height of the applet in pixels (e.g. "200" for 200 pixels), or
- A percentage representing the height the applet consumes within the HTML element the applet is nested (e.g. "50%" for 50 percent).
This is a required parameter.
Example
The following code creates an EditLive! object and assigns the identifier editlive1 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 = new EditLiveJava("ELApplet1","700","400");
Remarks
When using percentage sizes, ensure that EditLive! is added to the page within an element that has an absolute size.