This property sets the content of the EditLive! for Java applet between the <HTML> and </HTML> tags. The setting of this property is mutually exclusive with that of setBody.
JavaScript object.setDocument(strDocument)
strDocument Required. A string containing the text that will be the initial contents of the instance of EditLive! for Java between the <HTML> and </HTML> tags.
The following code creates an instance of EditLive! for Java and sets the initial contents to be <HTML><HEAD><TITLE>Example Contents</TITLE></HEAD><BODY><P>Initial contents of Ephox EditLive! for Java</P></BODY></HTML>.
Note: The string passed to the setDocument property must be URL encoded or encoded using the JavaScript escape function. The example below uses the JavaScript escape function.
var editlivejava1;
editlivejava1 = new EditLiveJava("ELJApplet1","600","400");
editlivejava1.setDocument(escape("<HTML><HEAD><TITLE>Example Contents</TITLE></HEAD><BODY><P>Initial contents of Ephox EditLive! for Java</P></BODY></HTML>"));
The string passed to the setDocument property must be URL encoded or encoded using the JavaScript escape function.
The setting of this property is mutually exclusive with that of setBody.
Copyright © 2001-2004 Ephox Corporation. All Rights Reserved.