小编Rec*_*oil的帖子

TinyMCE 4切换工具栏按钮状态

切换工具栏按钮状态的最简单方法是什么(就像使用默认的粗体按钮一样)?我无法"获得"那个将我从默认变为选中的按钮外观的Tinymce.这是我的插件代码(简化):

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 */
        }
    });
});
Run Code Online (Sandbox Code Playgroud)

tinymce toolbar button toggle

3
推荐指数
2
解决办法
7881
查看次数

标签 统计

button ×1

tinymce ×1

toggle ×1

toolbar ×1