如何使多个TinyMCE框架同时工作
我有5个使用tinyMCE的页面,所有页面都在iframe中,但只有一个页面可以工作 我怎样才能解决这个问题 初始化代码为:如何使多个TinyMCE框架同时工作,tinymce,wysiwyg,Tinymce,Wysiwyg,我有5个使用tinyMCE的页面,所有页面都在iframe中,但只有一个页面可以工作 我怎样才能解决这个问题 初始化代码为: tinyMCE.init({ // General options mode: "exact", theme: "advanced", elements: "txtBody", dialog_type: "modal", width: "500", height: "400", plugins: "auto
tinyMCE.init({
// General options
mode: "exact",
theme: "advanced",
elements: "txtBody",
dialog_type: "modal",
width: "500",
height: "400",
plugins: "autolink,lists,table,advhr,media,searchreplace,contextmenu,paste,directionality,noneditable,xhtmlxtras,template",
theme_advanced_buttons1: "styleselect,formatselect,fontselect,fontsizeselect,justifyleft,justifycenter,justifyright,justifyfull,",
theme_advanced_buttons2: "bold,italic,underline,strikethrough,cut,copy,paste,pastetext,pasteword,search,replace,insertfile,insertimage,",
theme_advanced_buttons3: "undo,redo,link,unlink,image,cleanup,code,forecolor,backcolortablecontrols,removeformat,sub,sup,media,advhr,ltr,rtl",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "right",
theme_advanced_statusbar_location: "bottom",
theme_advanced_resizing: true,
skin: "o2k7",
skin_variant: "silver",
content_css: "../../App_Themes/Document.css"
});
最合乎逻辑的解释是,您只使用元素选项指定其中一个。但如果不是这样,请提供更多细节
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_resizing : true,
theme_advanced_resizing_min_height : 100,
在您的代码中尝试上面的方法工具栏对齐方式是“右”而不是“左”第十八种,当使用
模式时,您需要指定所有(应转换为编辑器实例的html元素的ID:“精确”。
:
elements: 'my_html_element_id1,my_html_element_id2,my_html_element_id3,my_html_element_id,my_html_element_id5',
或者您使用模式:“textareas”,
,并注意页面上有5个文本区域,并且具有不同的ID
还有其他可能的设置。您可以在tinymce文档中查看他们关于tinymce的详细信息。可以详细描述您正在做的事情以及如何在页面上包含tinymce。另外,我假设您对所有文本区域(即“txtBody”)都有相同的id tnx all,通过将父div位置从相对/绝对更改为fix解决了这个问题