This method displays the Ephox EditLive! for XML instance object in the Web browser as a button. When passed the parameter true EditLive! for XML will automatically open in a popout window, clicking an associated button in the browser will hide the window. When set to false EditLive! for XML displays as a button which must be clicked in order for the popout window containing EditLive! for XML to appear.
A boolean indicating whether EditLive! for XML should automatically open in a popout window. When set to true EditLive! for XML will automatically open in a popout window, with an associated button in the browser, clicking the button will hide the window. When set to false EditLive! for XML displays as a button which must be clicked in order for the popout window containing EditLive! for XML to appear.
Example 16.7. showAsButton Method Example Scripting
The following example demonstrates how to cause EditLive! for XML to automatically appear in a popout window which has an associated button in the browser for showing and hiding the window.
JavaScript
var editlive_js;
editlive_js = new EditLiveXML("ELApplet1","700","400");
editlive_js.setDownloadDirectory("../../redistributables/editlivexml");
editlive_js.setConfigurationFile("sample_elconfig.xml");
editlive_js.setDocument(escape("<p>Document body contents</p>"));
editlive_js.showAsButton("true"); Before this method is called, all the required properties of an EditLive! for XML instance object must be set.
When using this method it must be called instead of the show method.
To set the display icons and text for the button created through the use of this method the following properties can be set:
Copyright 2001-2004 Ephox Corporation. All Rights Reserved.