Page tree
Skip to end of metadata
Go to start of metadata

This property must be set for all EditLive! global objects. It specifies the directory in which the Ephox EditLive! source files can be found on the server.

Syntax

Visual Basic Script
object.DownloadDirectory = strDownloadDirectory
ASP.NET
prefix:EditLiveJava DownloadDirectory = strDownloadDirectory
JavaScript
editliveInstance.setDownloadDirectory(strDownloadDirectory);

Parameters

strDownloadDirectory

A string specifying the location of the EditLive! source files and JavaScript library.

Examples

The following code would specify that the source files were in a directory called redistributables/editlivejava on the Web server.

VBScript
elglobal.DownloadDirectory = "../../redistributables/editlivejava"
ASP.NET Server Control
<elj:EditLiveJava 
  ...
  DownloadDirectory="../../redistributables/editlivejava" 
  ... 
/>
JavaScript
editlivejs.setDownloadDirectory("../../redistributables/editlivejava");

Remarks

This property must be set when instantiating EditLive! when using the ASP or ASP.NET implementations of EditLive!.

When using the Javascript implementation of EditLive!, you don't need to define the setDownloadDirectory property if the source files for the editor are stored in the same location as the editlivejava.js referenced in the page.

Example

The following two code snippets would both specify the EditLive! source files as located in the ../../redistributables/editlivejava/ directory relative to the webpage.

<html>
       <body>
               <script language="Javascript" src="../../redistributables/editlivejava/editlivejava.js"></script>
               <script language="Javascript">
                       var editliveRef = new EditLiveJava("editlive", 700, 400);
                       editliveRef.setDownloadDirectory("../../redistributables/editlivejava");
                       editliveRef.setConfigurationFile("../../redistributables/editlivejava/sample_eljconfig.xml");
                       editliveRef.show();
               </script>
       </body>
</html>
<html>
       <body>
               <script language="Javascript" src="../../redistributables/editlivejava/editlivejava.js"></script>
               <script language="Javascript">
                       var editliveRef = new EditLiveJava("editlive", 700, 400);
                       editliveRef.setConfigurationFile("../../redistributables/editlivejava/sample_eljconfig.xml");
                       editliveRef.show();
               </script>
       </body>
</html>
  • No labels