What is the simplest way to toggle the state of a toolbar button (like it works with the default bold-button)? I can't "get" to that class i Tinymce that changes the button's look from default to selected. This is my plugin code (simplified):
tinymce.PluginManager.add('myplugin', function (editor) {
editor.addButton('mybutton', {
text: false,
image: 'someimage.png',
onclick: function () {
/* Toggle this toolbar button state to selected (like with the tinymce bold-button)*/
/* and of course some other code goes here */
}
});
});