<menu> Element

This element contains settings for for a specific menu (eg. View, Edit).  These settings appear as a list of commands which appear on the menu.

Element Tree Structure

<editLiveForJava>
    <menuBar>
        <menu>

<editLiveForJava>
     ...
     <menuBar>
          <menu>
               <!--menu configuration settings-->
          </menu>
     </menuBar>
     ...
</editLiveForJava>

Required Attributes

Attribute Description
name This attribute specifies the name of the menu (eg. Edit, View).

Child Elements

Element Description
<menuItem> This element contains information for an item on the menu (eg. Cut, Undo, Table Properties).
<menuItemGroup> This element contains information for a grouping on the menu.  The commands added by this element can only be added and removed from the menu as a group.

A grouping is a set of two or more items which are related and their selection is mutually exclusive within EditLive! for Java.  For example, the Source View and Design View commands exist in a menuItemGroup.

<menuSeparator> This element informs EditLive! for Java that it should include a horizontal line, or menu separator, within the menu.
<customMenuItem>

This element specifies the properties for a developer defined custom menu item for use within Ephox EditLive! for Java.

<submenu> This element contains information for a submenu item which may be placed within a menu.  The Font, Font Size and Style submenus are an example of this.

Example

The following example demonstrates how to create a menu called Edit. 

<editLiveForJava>
    ...
    <menuBar>
        <menu name="Edit">
            ...
        </menu>
    </menuBar>
    ...
</editLiveForJava>

Remarks

The <menu> element can appear multiple times within the <menuBar> element.

See Also