admin管理员组文章数量:1387408
Can I somehow by running a javacript mand disable some buttons..
Not on the TinyMCE.init
, as I need to disable some of the buttons when a special event is happening.
I have tried cm.setDisabled(1);
but that makes all buttons disabled.
Any ideas if there is a call for that? Or should I try make a javascript function which i can call whenever to disable/re-enable a button again?
Can I somehow by running a javacript mand disable some buttons..
Not on the TinyMCE.init
, as I need to disable some of the buttons when a special event is happening.
I have tried cm.setDisabled(1);
but that makes all buttons disabled.
Any ideas if there is a call for that? Or should I try make a javascript function which i can call whenever to disable/re-enable a button again?
Share Improve this question asked Jan 6, 2013 at 5:15 Mark TopperMark Topper 3471 gold badge6 silver badges14 bronze badges 1- 1 tinymce seems to have quite good documentation. tinymce./wiki.php/API3:tinymce.api.3.x – 2pha Commented Jan 6, 2013 at 6:03
1 Answer
Reset to default 5Try to follow this fiddle..
Here Bold and Save buttons get disabled on clicking Disable button
and enabled on clicking Enable button.
Buttons are at the bottom of the page
For disabling a specific button you need id of that button which is your divId_buttonName like
tinyMCE.activeEditor.controlManager.get('disable_save').setDisabled(true) ;
In order to enable it again
tinyMCE.activeEditor.controlManager.get('disable_save').setDisabled(false) ;
Hope it helps!
本文标签: javascriptdisable some buttons TinyMCEStack Overflow
版权声明:本文标题:javascript - disable some buttons TinyMCE - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744570547a2613313.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论