Ephox Home Page Ephox Home Page  
Search
Buy/Upgrade
 
 Developers
Developers Home
EditLive! for Java
EditLive! for Windows
System Requirements
Getting Started
Integration Samples
Articles
API Reference
EditLive! for XML
Discussion Forums

AllowItem Method

Sets whether or not an item on the toolbars and menu bar can be used.

Applies To

EditLive Object

Syntax

JavaScript object.allowItem(strToolbarItemName);
 

Parameters

strToolbarItemName Required. String that specifies the unique name for the toolbar item.
bAllowed Required. Boolean that specifies whether or not the toolbar item can be used.

Examples

JavaScript

The following example would disallow the copy button.

<script language="JavaScript">
<!--

EditLiveGlobal.setDownloadDirectory("editlive/");

//Instatiate the EditLiveObject
var editLive1 = new EditLive("Plugin1", 600, 300);

//Assign a JavaScript handler for the EditLive onload event
editLive1.onload = EditLive1_onload;

//Assign a JavaScript handler for the EditLive ontoolbarbuttonclick event
editLive1.ontoolbarbuttonclick = EditLive1_ontoolbarbuttonclick;


//Use this function for setting up EditLive! and assigning variables
function EditLive1_onload()
{
   editLive1.setEditLiveMode('HTMLString');
   editLive1.setSource('<p>Sample content</p>');
   editLive1.allowItem("Copy", false);
}

//-->
</script>

Remarks

The item can be a custom button, using the Button Key specified when creating it.

For a full list of the existing EditLive! toolbar items please click here.

Minimum Version

EditLive! 3.0

See Also

 

 

Copyright © 1999-2005 Ephox Corporation. All Rights Reserved. 'Ephox' is a registered trademark of Ephox Corporation.
Java and the Java Powered logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.