我在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 回答
我最终在打开的弹出窗口中使用了以下代码 .
var ed = tinyMCE.getInstanceById('elm1');
var code = GetSelectedImage();
ed.execCommand('mceInsertContent',false,code);