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

前端 未结 3 531
误落风尘
误落风尘 2021-01-30 20:33

The documentation is not very clear on this.

name - String - Button name to add.

settings - Object - Settings object with title, cmd etc

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-30 20:44

    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.

提交回复
热议问题