<!--- Load the configuration file on the server to speed up loading --->
<cfset configpath=ExpandPath("config.xml")>
<cffile action="read" file="#configpath#" variable="xmlConfig">
 
<cfset contents="<p>This is the initial source</p>">
 
<html>
  <head>
    <title>Sample EditLive! ColdFusion Integration</title>
    <script src="../../redistributables/editlivejava/editlivejava.js">
    </script>
  </head>
  <body>
   <cfoutput>
     <script language="JavaScript">
       var editliveInstance;
       // Create a new EditLive! instance with the name 
       // "ELApplet1", a height of 600 pixels and a width of 700 pixels.
       editliveInstance = new EditLiveJava("ELApplet1", 700, 600);
       // This sets a relative path to the directory where
       //  the EditLive! redistributables can be
       //  found e.g. editlivejava.jar
       editliveInstance.setDownloadDirectory(
         "../../redistributables/editlivejava"
       );
       // This sets a relative or absolute path to the XML
       //  configuration file to use.
       editliveInstance.setConfigurationText("#URLEncodedFormat(xmlConfig)#");
       // This sets the initial content to be displayed within 
       //  EditLive!
       editliveInstance.setBody("#URLEncodedFormat(contents)#");
       // .show is the final call and instructs the JavaScript 
       //  library (editlivejava.js) to insert a new EditLive!
       //  at the this location.
       editliveInstance.show();
     </script>
   </cfoutput>
  </body>
</html>