TinyMCE图像编辑器集成

时间:2011-03-31 16:55:40

标签: tinymce

我在java中编写了Image Editor,我想与TinyMCE集成。虽然我很困惑。我有一个自定义工具栏按钮,我打开我的ImageEditor onclick如下。

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编辑器中?

非常感谢

1 个答案:

答案 0 :(得分:0)

我最终在打开的弹出框中使用了以下代码。

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

相关问题