Jquery 工具(选项卡)+小MCE
我正在尝试将 TinyMCE 集成到 Jquery 工具选项卡,但我似乎无法做到这一点。 当一切设置完毕后,我根本没有收到任何错误,也没有收到警告。我只得到一个空白文本区域。
我尝试使用其他选项卡(Jquery UI),通过该解决方案我可以看到 TinyMCE,但我想使用 Jquery 工具,因为它在 css 和文件大小方面很简单。
更新:这里有 2 个示例:一个使用 Jquery 工具,另一个使用 Jquery UI
示例 1: Jquery 工具 示例 2: Jquery UI
Tinymce init:
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});
谢谢。
布鲁诺
I'm trying to integrate TinyMCE in Jquery Tools Tabs, but I can't seem to do it.
When all is set, I simply get no error, nor a warning. I only get a blank textarea.
I tryed with other Tabs (Jquery UI), and with that solution I am able to see TinyMCE, but I would like to use Jquery Tools, because of it's simplicity in css and filesize.
Update: here's 2 examples: one using Jquery Tools and another Jquery UI
Example 1: Jquery Tools
Example 2: Jquery UI
Tinymce init:
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});
Thank you.
Bruno
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我明白了!
Jquery Tools 默认情况下隐藏选项卡面板内的所有 div,而 TinyMCE 使用 DIV 来显示按钮,因此这些 DIV 被隐藏。
该怎么办?
在 Jquery Tools Tabs CSS 中,通过添加 > 告诉它仅隐藏第一个 DIV。
示例:
而不是:
put
这样,只会隐藏第一个 DIV。
不管怎样,谢谢你 塔里亚马
I've got it!.
Jquery Tools hides all div's inside the tab's panels by default, and TinyMCE uses DIV's to show the buttons, so those DIV's were being hidden.
What to do?
In Jquery Tools Tabs CSS, tell it to only hide the first DIV by adding >.
Example:
instead of:
put
This way, it will only hide the first DIV.
Thank you anyway Thariama
我认为您的问题可能出在其中一个插件上。我建议您删除所有插件(
plugins: "",
),然后看看会发生什么。如果它按预期工作,请尝试逐个添加插件,直到找到阻碍tinymce初始化的插件。按钮配置在这里并不重要。如果合适的插件不存在 - 该按钮根本不会显示,但初始化不会因此而停止。I think your problem might be with one of the plugins. I suggest you remove all plugins (
plugins: "",
) and see what happens then. If it works as expected try adding plugin by plugin till you get the one that hinders tinymce to initialize. Button configuration is not crucial here. If the suitable plugin does not exist - the button simply does not show up, but inititialization won't stop because of this.