在 TinyMCE 中获取表格工具

发布于 2024-12-10 10:03:54 字数 1411 浏览 0 评论 0原文

使用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:
enter image description here

(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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

韵柒 2024-12-17 10:03:54

问题是您的配置中有两个插件元素。第二个:

plugins : "-insert",

...覆盖第一个,因此您只加载本地“插入”插件。您可以将两个列表合并到一个配置元素中,它应该可以正常工作。

The problem is that you have two plugin elements in your config. The second one:

plugins : "-insert",

...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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文