2

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>

助けはありますか?

4

1 に答える 1

2

現在、別のプロジェクトに取り組んでおり、同じ問題が再び発生しました

今回はcolorboxを使ってfancyboxのonCompleteイベントにこのコードを入れてみました。

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

そして、 TinyMCE での彼の答えに対するガッチのおかげで機能しました-fancyboxmで 2回目にロードするときに未定義の「e」、「j」、「t」

プロジェクト全体のインデックス ファイルで定義されている PS Tinymce init 関数

于 2011-01-10T20:08:04.613 に答える