|
Customizing the EditLive! ToolbarEphox, February 2004 SummaryEditLive! 4.0 offers great flexibility in allowing you to completely customize the functions offered on the EditLive! toolbars by:
More InformationIntroductionEditLive! 4.0 offers developers the ability to completely customize the functions offered on the EditLive! toolbars, to give end users a clean EditLive! interface that offers the feature set that suits their EditLive! application. Please note that the top EditLive! toolbar is the "Command" toolbar and the bottom EditLive! toolbar is the "Format" toolbar. Removing existing EditLive! toolbar buttonsEditLive! 4.0 includes a method called RemoveItem that can be used to remove any of the existing EditLive! toolbar items. When specifying a toolbar item to be removed, the toolbar item name must be specified exactly. The following code sample would remove the Insert Image button and the Font selection box.
For a full list of EditLive! toolbar item names please click here. Adding buttons to the EditLive! toolbarsEditLive! 4.0 offers you the ability to add your own buttons to the EditLive! toolbar. This allows you to write your own custom events to occur when the added toolbar buttons are pressed by the end user. This means that any extra functionality you wish to incorporate into EditLive! can now be added seamlessly to the EditLive! toolbars, making the graphical interface much cleaner for the end user. To add a button to the toolbar you will need to perform the following steps: 1. Assign a JavaScript handler for the EditLive ontoolbarbuttonclick event
2. Use the AddToolbarButton method to add the button graphic to the end of the specified toolbar.
Please note: the location of the toolbar button image must be an absolute URL. 3. Use the JavaScript handler defined in step 1 to define the custom event to be triggered when the toolbar button is clicked.
Limiting the selection available from a toolbar itemWhere users are able to select a value from an EditLive! toolbar item, developers can use EditLive!'s extensive API to limit the choices available to the end user. For example, the fonts which the end user can select from the font selection box can be limited to 'Arial' and 'Courier New'. The following table lists the EditLive! properties, methods and events for limiting the selection available from a toolbar item.
Disabling an EditLive! toolbar itemRather than completely removing a toolbar item, it is possible to simply disable the functionality so that the toolbar item still appears on the EditLive! toolbar, but is inaccessible to the end user. For example, the following code sample would disable the paragraph alignment buttons on the EditLive! toolbar.
For a full list of the EditLive! properties used to disable each of the EditLive! toolbar items please click here. Related ReadingEphox EditLive! 4.0 API Reference Guide List of existing EditLive! toolbar items
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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. |