Getting Started
Required Skills
The following skills are required prior to working with this tutorial:
- Basic Knowledge of XML
Required Tutorials Completed
The following tutorials are required to be undertaken before attempting this tutorial:
Adding and Removing Toolbar Buttons Using a Text Editor
Step 1. Open the sample_eljconfig.xml Configuration File
For your EditLive! SDK, open the redistributables/edlitlivejava directory in your SDK. Locate the sample_eljconfig.xml Configuration File. This file is the default Configuration File provided by Tiny.
Open the sample_eljconfig.xml Configuration File using a text editor.
Step 2. Remove the Table Menu
EditLive! menu items are stored as <menuItem> elements. These <menuItem> elements are embedded in <menu> elements. <menu> elements define the menu name (such as File or Edit). Use the Reference section of this SDK to read up on the <menu> and <menuItem> Configuration File elements.
In this tutorial we will edit the sample_eljconfig.xml file to:
- Remove all of the table related menu items and toolbar buttons.
- Add the Insert Horizontal Rule toolbar button and menu item.
Open the sample_eljconfig.xml file using a text editor. Locate the <menu name="ephox_tablemenu"> menu.
<menu name="ephox_tablemenu">
<menuItem name="InsTable"/>
<menuItem name="InsRowCol"/>
<menuItem name="InsCell"/>
<menuSeparator/>
<menuItem name="DelRow"/>
<menuItem name="DelCol"/>
<menuItem name="DelCell"/>
<menuSeparator/>
<menuItem name="Split"/>
<menuItem name="Merge"/>
<menuSeparator/>
<menuItem name="PropCell"/>
<menuItem name="PropRow"/>
<menuItem name="PropCol"/>
<menuItem name="PropTable"/>
<menuSeparator/>
<menuItem name="Gridlines"/>
</menu>
Delete this entire element to remove the table menu and all its menu items. Save this Configuration File as customized_eljconfig.xml.
Step 3. Add a New Menu
Nest a new <menu> element with-in the <menuBar> element. Assign the value Horizontal Rule to the name attribute for the <menu> element.
<menuBar>
...
<menu name="Horizontal Rule">
</menu>
</menuBar>
Step 4. Add a New Menu Item to the Horizontal Rule Menu
The Menu and Toolbar Item List Developer Guide article specifies the unique value (when assigned to a <menuItem> or <toolbarButton> name attribute) used to create each menu item or toolbar button.
Within the <menu name="Horizontal Rule"> element, nest a <menuItem> element with the value HRule assigned to its name attribute.
<menuBar>
...
<menu name="Horizontal Rule">
<menuItem name="HRule"/>
</menu>
</menuBar>