【问题标题】:TinyMCE Image Editor IntegrationTinyMCE 图像编辑器集成
【发布时间】:2011-03-31 16:55:40
【问题描述】:

我已经用 java 编写了图像编辑器,我想与 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 编辑器?

非常感谢

【问题讨论】:

    标签: tinymce


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2014-05-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-10
      相关资源
      最近更新 更多