开发者

TinyMCE Image Editor Integration

开发者 https://www.devze.com 2023-02-21 19:12 出处:网络
I have written Image Editor in java which I want to integrate with TinyMCE.Although I am so confused.I have a custom toolbar button and I open my ImageEditor onclick as below.

I have written Image Editor in java which I want to integrate with TinyMCE.Although I am so confused.I have a custom toolbar button and I open my ImageEditor onclick as below.

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"
});

This opens my editor but now what code I need to write on "Set Image" button of that popup so that I can insert selected image to TinyMCE editor ?

Thanks a lot


I ended up using following code in side the opened pop up .

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号