2011-03-31 96 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);