Visual Designer JavaScript Constructor

Description

This method creates an instance of the Visual Designer Javascript object.

Note

This method only applies for the Visual Designer JavaScript integrations.

Syntax

JavaScript

new VisualDesigner(strName, intWidth, intHeight);

Parameters

strName

A unique string identifier for this instance of the Visual Designer.

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.2. JavaScriptt Visual Designer Constructor Scripting Example

The following code creates a Visual Designer object and assigns the identifier designer to the JavaScript variable. The object has a unique name of VDApplet1, a width of 700 pixels and a height of 400 pixels.

var designer;
designer = new VisualDesigner("VDApplet1","700","400");

Remarks

The constructor must be called before any operations can occur on the Visual Designer 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, the Visual Designer will not be resized with the window.