What are all the possible settings attributes in the TinyMCE addButton () function?

The documentation is not entirely clear.

name - String - the name of the button to add.

- Object - settings object with a header, cmd , etc. .

"etc."? Indeed? Where can I see the other possible attributes?

+48
javascript user-interface button tinymce wysiwyg
Jan 18 '13 at 12:44
source share
3 answers
  • autofocus : True if the control should be focused when rendering
  • border : Example border fields: 1 1 1 1
  • classes : Spatial list of classes to add
  • disabled : whether the control is disabled by default.
  • hidden : whether the control is hidden by default
  • icon : icon for the button
  • image : Image to use for the icon
  • margin : Example field fields fields: 1 1 1 1
  • minHeight : minimum height for the control
  • minWidth : The minimum width for the control
  • name : Control instance name
  • padding : Example field fields: 1 1 1 1
  • role : WAI-ARIA management role
  • size : Button size small | middle | big
  • style : CSS style properties to add
  • text : text to display inside the widget
  • tooltip : tooltip displayed on hover

See the TinyMCE documentation page for a complete list of all settings and methods.

+35
Feb 06 '14 at 15:33
source share

What would you like to know which settings can fit into the settings object (tinymce 3). There he 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 

These settings are assigned in the createButton function of the ControlManager class.

+17
Jan 18 '13 at 13:38
source share

Having the same problem, trying to find addButton documents in V4, I found a link, just in case someone needs this.

tinymce.ui.Button

Hope this helps someone!

+5
Aug 18 '16 at 5:00
source share



All Articles