This element specifies an item to include within a menu in Ephox EditLive! for Java.
<editLiveForJava>
<menuBar>
<menu>
<menuItem>
<editLiveForJava> ... <menuBar> <menu> <menuItem ... /> </menu> </menuBar> ... </editLiveForJava> |
Attribute | Description |
name | This attribute gives the name for the menu item.
For use within a <menu> element it must be one of the following:
In <submenu> items this attribute provides the value of the attribute. It should correspond to the name or size of the relevant font or the value for the style. The value used for this attribute will be inserted into the HTML source of the document when the submenu item is selected. |
text | This attribute is only valid for <submenu> menu items. The attribute defines what the menu command is listed as in the <submenu>. |
The following example demonstrates how to add the mnuUndo, mnuRedo, mnuCut, mnuPaste, mnuSelectAll and mnuFind items to the Edit menu. Thus the instance of EditLive! for Java using this configuration will have only an Edit menu with these items.
<editLiveForJava>
...
<menuBar>
<menu name="Edit">
<menuItem
name="mnuUndo"/>
<menuItem
name="mnuRedo"/>
<menuItem
name="mnuCut"/>
<menuItem
name="mnuCopy"/>
<menuItem
name="mnuPaste"/>
<menuItem
name="mnuSelectAll"/>
<menuItem
name="mnuFind"/>
</menu>
</menuBar>
...
</editLiveForJava>
The following example demonstrates how to add the Times New Roman, Courier New and Arial fonts to the mnuFontFace <submenu>. They will be listed as the New Roman, Courier and Company Default fonts respectively, in the submenu due to their text attributes
<editLiveForJava>
...
<menuBar>
<menu name="Format">
<submenu
name="mnuFontFace">
<menuItem
name="Times New Roman" text="New Roman"/>
<menuItem
name="Courier New" text="Courier"/>
<menuItem
name="Arial" text="Company Default"/>
</submenu>
</menu>
</menuBar>
...
</editLiveForJava>
The <menuItem> element can appear multiple times within the <menu> element.
The <menuItem> element must be a complete tag, it cannot contain a tag body. Therefore the tag must be closed in the same line. See the example below:
<menuItem name=... />
Copyright © 2001-2004 Ephox Corporation. All Rights Reserved.