<menu> Configuration Element

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

Configuration Element Tree Structure

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

Required Attributes

name

This attribute specifies the name of the menu (e.g. Edit, View). Developers can create their own menus or EditLive! for XML also provides 8 default menu names. These default menu names are automatically internationalized to match the user's locale. To create an instance of one of the default menus, use one of the following strings as a value for name:

  • ephox_filemenu - The internationalised File menu.

  • ephox_editmenu - The internationalised Edit menu.

  • ephox_viewmenu - The internationalised View menu.

  • ephox_insertmenu - The internationalised Insert menu.

  • ephox_formatmenu - The internationalised Format menu.

  • ephox_toolsmenu - The internationalised Tools menu.

  • ephox_tablemenu - The internationalised Table menu

  • ephox_formmenu - The internationalised Forms menu.

Child Elements

<menuItem>

This element contains information for an item on the menu (eg. Cut, Undo, Table Properties).

<designerMenuItem>

This element specifies an item to include within a menu in the Visual Designer.

<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 XML. For example, the Source View and Design View commands exist in a menuItemGroup.

<menuSeparator>

This element informs EditLive! for XML 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 XML.

<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 an instance of the default Edit menu.

<editLive>
    ...
    <menuBar>
        <menu name="ephox_editmenu">
            ...
        </menu>
    </menuBar>
    ...
</editLive> 

Remarks

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