Document Property

Description

This property specifies the initial document contents of the Ephox EditLive! for XML applet.

Note

This property cannot be used with the Visual Designer.

Syntax

JavaScript

setDocument(strDocument);

Parameters

strDocument

A string specifying the initial document contents of the EditLive! for XML applet.

The default value is an empty string.

Example

Example 16.15. Document Property Example Scripting

The following code would set the initial document contents of EditLive! for XML to be equal to "Initial contents of Ephox EditLive!".

JavaScript

editlivejs.setDocument(escape("<HTML><HEAD><TITLE>Example</TITLE></HEAD>
<BODY><P>Initial contents of Ephox EditLive!</P></BODY></HTML>"));

Note

The string passed to the JavaScript setDocument property must be URL encoded or encoded using the JavaScript escape function. It is recommended that a server-side URL encoding function be used if available as the JavaScript escape function does not fully comply with the URL encoding standard.

Remarks

When using the JavaScript setDocument property the string parameter must be URL encoded or encoded using the JavaScript escape function. It is recommended that a server-side URL encoding function be used if available as the JavaScript escape function does not fully comply with the URL encoding standard.