在 TinyMCE 中获取表格工具
使用TinyMCE时,我尝试激活表格工具。但是,当我将 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 版本。知道会发生什么吗?
When using TinyMCE, I try to activate the table tools. However, when I add the tabletools to my configuration, a set of 'empty' buttons show up, see:
(right top)
This is the code:
$('.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
});
The table plugin is present in the plugin folder, I get no javascript error whatsoever, and I just installed the latest TinyMCE version. Any idea what could be happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是您的配置中有两个插件元素。第二个:
...覆盖第一个,因此您只加载本地“插入”插件。您可以将两个列表合并到一个配置元素中,它应该可以正常工作。
The problem is that you have two plugin elements in your config. The second one:
...is overwriting the first and so you only load the local "insert" plugin. You can combine both lists into the one config element and it should work correctly.