2010-11-28 53 views
2

我想用faceym模式窗口使用tinymce編輯器。但打開模態窗口時,TinyMCE的未加載,我得到的螢火tinymce文本編輯器不加載在facebox模式窗口

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

任何幫助,沒有的Jscript的錯誤?

+0

有些更多的信息會很好。你收到任何JavaScript錯誤(使用螢火蟲)?如果你使用'plugins:'會發生什麼?「。配置中的錯誤可能會使tinymce關閉。請發佈您的完整tinymce.init。 – Thariama 2010-11-29 06:42:33

回答

2

現在我工作的另一個項目,我再次

有同樣的問題這一次我用顏色框,並把這個代碼的onComplete的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

附:在整個項目的索引文件中定義的Tinymce init函數