The documentation is not very clear on this.
name - String - Button name to add.
settings - Object - Settings object with title, cmd etc.
"etc"? Really? Where can I see the rest of the possible attributes?
autofocus
: True if the control should be focused when renderedborder
: Border box values example: 1 1 1 1classes
: Space separated list of classes to adddisabled
: Is the control disabled by defaulthidden
: Is the control hidden by defaulticon
: Icon to use for buttonimage
: Image to use for iconmargin
: Margin box values example: 1 1 1 1minHeight
: Minimal height for the controlminWidth
: Minimal width for the controlname
: Name of the control instancepadding
: Padding box values example: 1 1 1 1role
: WAI-ARIA role to use for controlsize
: Size of the button small|medium|largestyle
: Style CSS properties to addtext
: Text to display inside widgettooltip
: Tooltip text to display when hoveringFor a full list of all the settings and methods see the TinyMCE documentation page
What you would like to know is what settings may fit into the settings object (tinymce 3). Here it is:
title --> title
label --> label
scope --> scope
onclick --> function to be called onclick
menu_button --> flag, defines if the button is a menu button
cmd --> tinymce command to get executed onClick
ui --> paramter for the tinymce command cmd
value --> value for the tinymce command cmd
Those settings get assigned in the function createButton
of the class ControlManager
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With