toolbar-button
A custom button the in Xopus user interface.
<overlay xmlns="http://xopus.com/2009/lui">
<toolbar-button
iconsrc="show-draft-comments.gif"
command="showDraftCommentsCommand"
after="ShowChangesButton"
id="ShowDraftCommentsCommand"/>
<toolbar-button
iconsrc="show-required-cleanup.gif"
command="showRequiredCleanupCommand"
after="ShowDraftCommentsCommand" />
<toolbar-button
role="tagname"
iconsrc="tagname.gif"
after="strongRoleButton"/>
</overlay> Role
The above example with role corresponds to the following nodeConfig:
<x:nodeConfig>
<x:node match="tag">
<x:role>tagname</x:role>
</x:node>
</x:nodeConfig>Positioning the button
Buttons are placed on the toolbar as an overlay over the supplied Xopus toolbar. Use the before and after attributes to insert or append a button after an existing button.
Note that some of the toolbar buttons in the Xopus supplied toolbar button are not always available. Depending on the the configuration, there may not be a spellchecker, change tracking button, or role-related buttons such as the bold button.
You can find out the ID's of Xopus supplied buttons with a DOM inspector tool in your browser such as Firebug. Current ID's of buttons as of Xopus 4.1.1 are: SaveButton, ReloadButton, PrintButton, UndoButton, RedoButton, SpellCheckerButton, ShowChangesButton, FindReplaceButton, ShowPropertiesButton, CutButton, CopyButton. PasteButton, InsertMenuButton, DeleteMenuButton, strongRoleButton, emphasisRoleButton, underlineRoleButton, superscriptRoleButton, subscriptRoleButton, unorderedlistRoleButton, orderedlistRoleButton, hyperlinkRoleButton, InsertTableMenuButton, InsertImageButton, InsertSymbolMenuButton, OutdentButton, IndentButton, MoveUpMenuButton, MoveDownMenuButton.
- Documentation
- › Configuration
- › Elements
- › toolbar-button
toolbar-button element
Namespace: http://xopus.com/2009/lui
Attributes
- after
- The ID of the user interface component where the button is positioned after. (Optional)
- before
- The ID of the user interface component where the button is positioned before. If neither
beforeorafteris set, then thetoolbar-buttonelement should have a parent with anidattribute, and the button will be appended to the component with that ID. (Optional) - command
- The name of the command this button is coupled with. See Editor.addCommand (Optional)
- role
- The role attribute can be defined as a replacement of the
commandattribute. 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. (Optional) - iconsrc
- 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. (Optional)
- id
- The ID for this button component. (Optional)
- available
- When
falsethe button will no longer be available in the toolbar. See also Command.getAvailable. - label
- The
alt/titletext of the button when the user mouseovers the button.
Parent Elements
History
| version | event |
|---|---|
| Xopus 4.1 | Introduction. |