duande1985 2015-08-24 15:47
浏览 65

RoxyFilename Ckeditor更改目录图像

I tried to implement Roxyfileman with ckeditor. It worked. But when I tried to change the image default directory, it seemed not to work. Any idea?

Thanks you.

My config ckeditor ===> working well

CKEDITOR.editorConfig = function( config ) {

//roxyFileman
    var roxyFileman = '/myapplication/boutique/admin/ext/RoxyFileman_143/index.html';
    config.filebrowserBrowseUrl='roxyFileman';
    config.filebrowserImageBrowseUrl =roxyFileman+'?type=image';
    config.removeDialogTabs= 'link:upload;image:upload';
// end roxyFileman
};

the script for Roxyfilename : doesn't work

      <script>
          $(function(){
        FileSelected(file) {

          // Set the value of field sent to Fileman via URL param "field".
    //opener.document.getElementById(RoxyUtils.GetUrlParam('field')).value = file.fullPath;   
   opener.document.getElementById(RoxyUtils.GetUrlParam('home/workspace/myapplication/sources/')).value = file.fullPath;
          // Set the source of an image which id is sent to Fileman via URL param "img".
    //      opener.document.getElementById(RoxyUtils.GetUrlParam('img')).src = file.fullPath;
          opener.document.getElementById(RoxyUtils.GetUrlParam('image')).src = file.fullPath;
          // Close file manager if it's opened in separate window.
          self.close();
          // Close file manager if it's opened in JQuery dialog.
          $(opener.document).find('#dialog_element_id').dialog('close');

        }
        }
        </script>
  • 写回答

2条回答 默认 最新

  • dongweiben5229 2015-09-08 06:05
    关注

    This works for me:

    function FileSelected(file){
        window.opener.CKEDITOR.tools.callFunction(1, file.fullPath);
        self.close();
    }
    

    Learned from this post: https://zerokspot.com/weblog/2009/09/09/custom-filebrowser-callbacks-ckeditor/

    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向