Documentation Center

menu-item

This topic describes the menu-item element

Description

Menu items, configured using the menu-item element, are used in dropdown menus in the Knowledge Center UI. Refer to the topic for more information.

You can add custom menu-items or toolbar buttons to the UI using the overlay element in the configuration. The behavior is based on a role or a command.

<dropdown-button after="SaveButton">
  <menu>
    <menu-group>
      <menu-item iconsrc="html.gif" command="publishHTMLCommand" label="Make HTML"/>
    </menu-group>  
  </menu>
</dropdown-button>

Namespace

http://xopus.com/2009/lui

Attributes

NameDescription and UseType
command-Optional

The name of the command coupled with this button. For more details see the topics on the object command and on the method Editor.addCommand

string
role-Optional

-The role attribute can be defined as an altenative to the command attribute. The value of this attribute must correspond to a role definition from the node configuration for an element. The will effectively create a toolbar button which acts similarly to the bold button.

string
iconsrc

Optional

-URL for the icon on this button. Relative URI's are resolved from the location of the configuration file. The size of this icon should be 24x24, with the picture inside the 18x18 range. Use a transparent GIF, as we are not adding alpha styling for PNG.

valid URL
id

Optional

-The ID for this button component.

string
labelThe text of the item.string
mode-Optional

This attribute describes behavior for pressing the menu-item.

When set to toggle (which is default), the current context will be converted to the new element (if allowed by schema) and can be converted back by clicking the menu-item again.

When set to insert, the new element is always inserted as close to the cursor position as allowed by schema. Clicking this menu-item again does not remove previously added element but rather creates another one.

string

Parent element

menu-group