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

The configuration of EditLive! is performed at load-time through the EditLive! Load Time Methods and a EditLive! Configuration File. The Load Time Methods allow basic settings to be configured for EditLive!, whereas the Configuration File includes detailed settings for the interface and the behavior of EditLive!. When conflicts arise between the settings in the Configuration File and the Load Time Properties, the configuration file will always take precedence over any other setting.

The one exception to this rule is when specifying the character set to be used by EditLive!. For more information on this feature, see the Specifying Character Sets in the Applet article.

Configuration via the Load Time Properties of EditLive! 

The EditLive! Load Time Methods enable developers to configure the properties of EditLive! in addition to setting the content. The Load Time Properties also provide the means to specify the Configuration File to be used to configure the majority of the settings for EditLive!. These load-time properties are available in JavaScript, ASP and ASP.NET.

Important Load Time Properties

The following load-time properties are very important based on the context of the functions the developer wishes EditLive! to perform.

  • setAutoSubmit Method
    The property enables or disables the ability for EditLive!'s content to be automatically submitted during HTTP Posts. For more information on this functionality see the article Retrieving Content From EditLive!.
  • setBaseURL Method 
    Sets the URL which EditLive! uses to resolve relative URLs in the document.
  • setConfigurationFile Method or setConfigurationText Method
    These load-time properties are used to specify the configuration file to be used for the specific instance of EditLive!. The properties load a configuration file as either a URL reference to a configuration file or as a string representation of the configuration file XML.
  • setDebugLevel Method
    Sets the level of detail provided in the Java console debug log.
  • setHeight Method
    Sets the height of the EditLive! applet.
  • setReturnBodyOnly Method
    This property stipulates whether to return either the entire contents of EditLive! or only the contents nested between the <body> HTML tags within EditLive!.
  • setWidth Method
    Sets the width of the EditLive! applet.

Configuration via an EditLive! Configuration File

An EditLive! configuration file is a single XML file used to specify numerous elements of the EditLive! editor. Configuration files facilitate the customization of the behavior and functionality of EditLive!. Almost the entire interface of EditLive! can be customized via the configuration file. Customization of the interface may also include the development of custom functionality accessed via custom toolbar and menu items.

Because server-side languages can be used to generate documents of any type at run-time, configuration files can also be stored as server-side language files (e.g. JSP files, ASP files) as long as the files contain calls to render the information as XML at run-time.

EditLive! requires a configuration file to load. For information on how to specify a configuration file to load with an instance of EditLive!, please see the setConfigurationFile Method and setConfigurationText Method articles.

In cases where either the settings in the document content of EditLive! or the settings in the load-time properties conflict with the settings in the configuration file, the settings in the configuration file will take precedence. For example, if the configuration file specifies style

H1{font-size: 10;}

and the setStyles Method for an instance of EditLive! specifies

H1{font-size: 20} H2{font-size: 15}

, the resulting embedded style for the XHTML will be

H1{font-size: 10}

Configuration files can be created and edited by manually editing an EditLive! Configuration File via text editor.

Instantiating EditLive! Example

The following example demonstrates how to use the EditLive! load-time properties to instantiate the editor, as well as specify the EditLive! configuration file to be used.

<script src="../../redistributables/editlivejava/editlivejava.js"/>

<form name="form1" method="POST">
  <script type="text/javascript"> 
    var editlive1;
    editlive1 = new EditLiveJava("ELApplet1", "700", "400");
    editlive1.setConfigurationFile("sample_eljconfig.xml");
    // ...
    // other load time properties specified here as well
    // ...
    editlive1.show();
  </script>
</form>

See Also

  • No labels