2011-03-31 87 views
1

我已經寫了java的圖像編輯器,我想與TinyMCE集成。雖然我很困惑。我有一個自定義的工具欄按鈕,我打開我的ImageEditor onclick如下。TinyMCE圖像編輯器集成

tinyMCE.activeEditor.windowManager.open({ 
    file : "/ImageEditor/index.jsp", 
    title : 'Image Manager', 
    width : 800, // Your dimensions may differ - toy around with them! 
    height : 600, 
    resizable : "yes", 
    inline : "yes", 
    close_previous : "no" 
}); 

這將打開我的編輯,但現在什麼樣的代碼,我需要讓我可以將選定的圖像在TinyMCE編輯器對彈出窗口的「設置圖片」按鈕來寫?

非常感謝

回答

0

我結束了在打開的彈出窗口中使用下面的代碼。

var ed = tinyMCE.getInstanceById('elm1');
var code = GetSelectedImage();
ed.execCommand('mceInsertContent',false,code);