By this stage you've now created a new Configuration File that contains the configurations specified in the default Configuration File, as well as the following changes:
- The Design and Code view tabs are located at the top of the editor.
- When editing content in the Code view, only the HTML content in the <BODY> of the editor's HTML Document is shown.
This configuration of EditLive! works well with the Setting the Body in the Applet Tutorial. Here is an example of the config_tutorial.xml configuration file used in conjunction with the Setting the Body in the Applet Code:
This code infers that the config_tutorial.xml file is stored in the same location as the default Configuration File sample_eljconfig.xml.
<html> <body> <form name="exampleForm"> <p><textarea id="bodyContents" cols="80" rows="5"></textarea> <br/><input type="button" value="Set <BODY> Contents" onclick="buttonPress()"></p> <script src="../../redistributables/editlivejava/editlivejava.js" language="JavaScript"></script> <script> var editlivejava = new EditLiveJava("ELJApplet", "700", "400"); editlivejava.setConfigurationFile("../../redistributables/editlivejava/config_tutorial.xml"); editlivejava.setBody(encodeURIComponent("<p>Original <i>HTML</i> loaded into EditLive!</p>")); editlivejava.show(); function buttonPress() { editlivejava.setBody(encodeURIComponent(document.exampleForm.bodyContents.value)); } </script> </form> </body> </html>
See also: