简体   繁体   English

如何在自定义tinymce工具栏菜单项中添加类?

[英]How to add a class to custom tinymce toolbar menu item?

I've added custom toolbar button for tinymce with image, I want to add a class to that. 我为带有图像的tinymce添加了自定义工具栏按钮,我想在其中添加一个类。 I've tried of adding class parameter but didnt work for me. 我尝试添加类参数,但对我没有用。 pls advice 请咨询

  tinyMCE.PluginManager.add('subBtn', function(editor, url) {

        editor.addButton('subBtn', {
            class :'buttonClas',
            image: icon-path,
            icon: true,
            tooltip: tooltip,
            onclick: function() {
                // Open window
                editor.windowManager.open({
                    title: 'PTION',
                    body: [
                        {type: 'textbox',value: subBtin, name: 'title', label: 'subBtn'}
                    ],
                    onsubmit: function(e) {


                    }
                });
            }
        });

    });

尝试使用“类”而不是“类”-您可以添加多个(除以空格)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM