2012-08-26 72 views
1

我試圖將jbimages插件添加到TinyMCE
當我添加一行TinyMCE配置,jbimagesplugins:TinyMCE加載失敗,並給出了這個錯誤在Firebug的控制檯:激活jbimages插件導致TinyMCE無法加載

TypeError: this.getDoc() is undefined 
http://localhost/proj/client/js/tiny_mce/tiny_mce.js 
Line 1 

TinyMCE配置失敗是這樣的:

tinyMCE.init({ 
    // General options 
    mode : "exact", 
     elements : "question", 
    theme : "advanced", 
    plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,visualblocks,jbimages", 

    // Theme options 
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,ltr,rtl,formatselect,fontselect,fontsizeselect", 
    theme_advanced_buttons2 : "search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", 
    theme_advanced_toolbar_location : "top", 
    theme_advanced_toolbar_align : "left", 
    theme_advanced_resizing : true, 
    language : 'fa', 
     directionality : "rtl", 

    // Drop lists for link/image/media/template bloglists 
    template_external_list_url : "lists/template_list.js", 
    external_link_list_url : "lists/link_list.js", 
    external_image_list_url : "lists/image_list.js", 
    media_external_list_url : "lists/media_list.js", 
    relative_urls:false, 
    // Replace values for the template plugin 
    template_replace_values : { 
     username : "Some User", 
     staffid : "991234" 
    } 
}); 

什麼問題?
謝謝

回答

0

問題解決了。
問題是我在TinyMCE中使用language選項,而jbimages嘗試加載不存在的語言文件。
我根據this創建了jbimages所需的語言文件,問題已解決。