This element specifies the properties for a developer defined custom combo box item for use within Ephox EditLive! for Java. The custom combo box item must be listed within a <customToolbarComboBox> element and will therefore appear on one of the toolbars within EditLive! for Java.
<editLiveForJava>
<toolbars>
<commandToolbar>
OR <formatToolbar>
<customToolbarComboBox>
<customComboBoxItem>
<editLiveForJava> ... <toolbars> <formatToolbar> OR <commandToolbar>* <customToolbarComboBox> <customComboBoxItem ... /> </customToolbarComboBox> </formatToolbar> OR </commandToolbar>* </toolbars> ... </editLiveForJava> |
*Note: The <customToolbarComboBox> element can exist within either the <formatToolbar> element or the <commandToolbar> element. Closing tags should be matched to opening tags (ie. <formatToolbar> ... </formatToolbar>).
Attribute | Description |
name | The name which uniquely defines this custom combo box item within the <customToolbarComboBox> element. This means that there cannot be two <customComboBoxItem> elements with the same name within one <customToolbarComboBox> element. |
text | The text to represent this item within the combo box it is to be listed in. |
action | The action which this custom combo box item performs when
selected. Note: This attribute has three possible values; insertHTMLAtCursor, insertHyperlinkAtCursor or raiseEvent. The raiseEvent functionality should not be used with the EditLive! for Java JavaBean. |
value | The value of the text or hyperlink to be inserted or the
name of the JavaScript function to be called when this toolbar button is
clicked. Note: When using the insertHTMLAtCursor action the HTML to be inserted must be URL encoded in the XML file. For example, <p>HTML to insert<p> becomes %3Cp%3EHTML%20to%20insert%3C/p%3E. |
The following example demonstrates how to define a custom combo box item for use within a custom combo box which exists on the EditLive! for Java Command Toolbar. The combo box item defined in this example will insert HTML to insert at the cursor, note that the value in the example below is URL encoded.
<editLiveForJava>
...
<toolbars>
<commandToolbar>
<customToolbarComboBox
name="customCombo">
<customComboBoxItem
name="customComboItem1"
text="Custom Combo Item"
action="insertHTMLAtCursor"
value="%3Cp%3EHTML%20to%20insert%3C/p%3E" />
</customToolbarComboBox>
</commandToolbar>
</toolbars>
...
</editLiveForJava>
The <customComboBoxItem> element can appear multiple times within the <customToolbarComboBox> element.
The <customComboBoxItem> 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:
<customComboBoxItem name=... />
Text assigned to the value attribute must be URL encoded as it is in the example above.
Copyright © 2001-2004 Ephox Corporation. All Rights Reserved.