Tinymce, disable the Numlist dropdown

Is it possible to disable the drop-down menu for the numlist button on tinymce? And if so, how?

Thanks in advance.

Due to the first answer: theme_advanced_disable is not the answer to my question. It completely removes the button. I need to disable the drop-down list where you can select list types. Only the standard type is allowed, another choice.

+4
source share
3 answers

I found a solution after a long time ...


  • download source plugin
  • define a toolbar without a "bullist", but with your own button "mylist"
  • define button 'mylist', which will call the function of the source plugin (from the source list /plugin.min.js)

Full code:

tinymce.init({ plugins: ["lists"], //toolbar1: "bullist numlist", toolbar1: "mylist numlist", setup: function(editor) { editor.addButton('mylist', { text: '', //without text label icon: 'bullist', //use original icon tooltip: 'Bullet list', //tooltip, if you want onclick: function() { //call original plugin function tinymce.activeEditor.execCommand('InsertUnorderedList'); } }); }, }); 
+3
source

Just remove the advlist plugin in the init function

+3
source

with theme_advanced_disable ?

 tinyMCE.init({ ... theme_advanced_disable : "numlist" }); 
0
source

Source: https://habr.com/ru/post/1484164/


All Articles