<toolbarButton> Element

This element will cause a particular button to be present on the toolbar within Ephox EditLive! for Java.

Element Tree Structure

<editLiveForJava>
    <toolbars>
        <formatToolbar> OR <commandToolbar>
            <toolbarButton>

<editLiveForJava>
     ...
     <toolbars>
          <formatToolbar> OR <commandToolbar>*
               <toolbarButton ... />
          </formatToolbar> OR </commandToolbar>*
     </toolbars>
     ...
</editLiveForJava>

*Note:  The <toolbarButton> element can exist within either the <formatToolbar> element or the <commandToolbar> element.  Closing tags should be matched to opening tags (ie. <formatToolbar> ... </formatToolbar>).

Required Attributes

Attribute Description
name This attribute gives the name for the button.  It must be one of the following:
  • tlbNew - The New button.
  • tlbOpen - The Open button.
  • tlbSave - The Save button.
  • tlbCut - The Cut button.
  • tlbCopy - The Copy button.
  • tlbPaste - The Paste button.
  • tlbFind - The Find button.
  • tlbUndo - The Undo button.
  • tlbRedo - The Redo button.
  • tlbHRule - The Insert Horizontal Rule button.
  • tlbHLink - The Hyperlink button.
  • tlbSymbol - The Insert Symbol button.
  • tlbBookmark - The Insert Bookmark button.
  • tlbImageServer - The Insert Server Image button.
  • tlbInsTable - The Insert Table button.
  • tlbInsRow - The Insert Row button.
  • tlbInsCol - The Insert Column button.
  • tlbDelRow - The Delete Row button.
  • tlbDelCol - The Delete Column button.
  • tlbSplit - The Split Cell button.
  • tlbMerge - The Merge Cells button.
  • tlbGridlines - The Show Gridlines button.
  • tlbBold - The Bold button.
  • tlbItalics - The Italics button.
  • tlbUnderline  - The Underline button.
  • tlbStrike - The Strikethrough button.
  • tlbColor - The (text) Color button.
  • tlbHighlighterColor - The text Highlight Color button.
  • tlbSpelling - The Check Spelling button.
  • tlbIncreaseIndent - The Increase Indent button.
  • tlbDecreaseIndent - The Decrease Indent button.
  • tlbRemoveFormatting - The Remove Formatting button.
  • tlbWordCount - The Word Count button.

Example

The following example demonstrates how to add the Cut, Copy and Paste buttons to the Command Toolbar.

<editLiveForJava>
    ...
    <toolbars>
        <commandToolbar>
            <toolbarButton name="tblCut"/>
            <toolbarButton name="tblCopy"/>
            <toolbarButton name="tblPaste"/>
        </commandToolbar>
    </toolbars>
    ...
</editLiveForJava>

Remarks

The <toolbarButton> element can appear multiple times within the <formatToolbar> or <commandToolbar> elements.

The <toolbarButton> 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:

    <toolbarButton name=... />

See Also