使用TinyMCE时,我尝试激活table tools。但是,当我将tabletools添加到我的配置时,会出现一组“空”按钮,请参阅:
(右上)
这是代码:
$('.tinymce').tinymce({
script_url : 'js/tinymce/tiny_mce.js',
content_css : 'css/tinymce.css',
language : "en",
mode : "textareas",
theme : "advanced",
skin : "o2k7",
fix_list_elements : true,
verify_css_classes:true,
plugins : "paste,fullscreen,table",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,undo,redo,|,justifyleft,justifycenter,justifyright,justifyfull,|,bul list,numlist,formatselect,fontselect,tablecontrols",
theme_advanced_buttons2 : "cut,copy,paste,pasteword,|,outdent,indent,blockquote,|,link,unlink,anchor,InsertImageBtn,cleanup,|,forecol or,backcolor,hr,removeformat,sub,sup,|,charmap,emotions,iespell,media,advhr,|,fullscreen",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
valid_elements : "img[src|alt|title],a[href|target|title],-p,strong/b,em/i,-ul,-ol,-li,-table[!border:1|!cellspacing:0|!cellpadding:5 ],th,-tr,td,p[class],span[class]",
paste_auto_cleanup_on_paste : true,
fix_table_elements : true,
plugins : "-insert",
width:750,
height:500
});
表插件存在于插件文件夹中,我没有得到任何javascript错误,我刚刚安装了最新的TinyMCE版本。知道会发生什么吗?
答案 0 :(得分:2)
问题是你的配置中有两个插件元素。第二个:
plugins : "-insert",
...覆盖第一个,所以你只加载本地“插入”插件。您可以将两个列表组合到一个配置元素中,它应该可以正常工作。