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
Add a ment  | 

1 Answer 1

Reset to default 5

Try 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