2014-03-13 19 views
0

guys ...Lightview with tinymce

我正在嘗試使用lightviewtinymce在一起。

在測試簡單的事情時,我無法重現使用inline類型lightview中呈現tinymce的調用。

e.g:

   Lightview.show({ 
       url: "contentPageArea", 
       type: "inline", 
       options: { 
        closeButton: false, 
        evalScripts: true, 
        afterUpdate: function (element, position) { 
         console.log("after"); 
         tinyMCE.execCommand('mceAddControl', false, 'txtAreaContentPage'); 
        } 
       } 
      }); 

預先感謝任何幫助。

回答

0

我剛剛用這種方法修復它:

function removeTinyMCE() { 
    tinyMCE.execCommand('mceFocus', false, 'txtAreaContentPage'); 
    tinyMCE.execCommand('mceRemoveControl', false, 'txtAreaContentPage'); 
} 

,並呼籲前的AddControl

afterUpdate: function (element, position) { 
       removeTinyMCE(); 
       tinyMCE.execCommand('mceAddControl', false, 'txtAreaContentPage'); 
      }