tinymce文本编辑器不会加载到facebox模态窗口中

时间:2010-11-28 11:59:28

标签: tinymce text-editor lightbox facebox

我正在尝试使用带有facebox模态窗口的tinymce编辑器。但是当打开模态窗口时我没有加载tinymce并且我在firebug中没有得到Jscript的错误

<script type="text/javascript">

 jQuery(document).ready(function($) {
     $('a[rel*=facebox]').facebox();
 })

 tinyMCE.init({ 
    theme : "advanced", 
    mode : "textareas", 
    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,advlist", 
    // 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_resizing : true

});
</script>

任何帮助?

1 个答案:

答案 0 :(得分:2)

现在我正在开展另一个项目,我又遇到了同样的问题

这次我使用了colorbox并将此代码放在fancybox的完整事件上。

 $(".edit").colorbox({
    onComplete : function(){ tinyMCE.execCommand('mceAddControl', true, "textare_id"); },
    onClosed   : function(){ tinyMCE.execCommand('mceRemoveControl', true, "textare_id");}  
 });

并且感谢gutch的回答 TinyMCE - undefined 'e','j','t' when loading for a second time in fancyboxm

P.S。在整个项目的索引文件中定义的Tinymce初始化函数