dongxu4023 2015-08-23 09:54
浏览 89

使用RoxyFileman的选定文件不会出现在TinyMCE编辑器中

When I select a file or an image with the roxy fileman, the file or the image doesn't appear in the editor if I don't use the keyboard in the tinymce source field. It works fine if I write a space and I delete it before clicking the "Ok" button.

The path (a good path) given by roxy fileman isn't considered by the tinymce image or link tool if a keyup event isn't triggered ! ?

Same problem in Firefox or Chrome.

PHP 5.5.9, TinyMCE 4, roxyfileman 1.4.3, Ubuntu 14.04

Is there a parameter that I don't use correctly ?

My code:

<!DOCTYPE html>
<html>
    <head>
        <title>Test TinyMCE</title>
        <script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>

        <script type="text/javascript" src="js/tinymce/tinymce.min.js"></script>
        <!-- place in header of your html document -->

    </head>
    <body>
<textarea id="tinymce" name="tinymce" rows="60" cols="80">
</textarea>
<script>
// This must be set to the absolute path from the site root.
var roxyFileman = '/public/fileman/index.html?integration=tinymce4';
  $(function() {
    tinyMCE.init({language: 'fr_FR', selector: '#tinymce', plugins: 'link image', 
                 toolbar: "link | image", file_browser_callback: RoxyFileBrowser});
});

function RoxyFileBrowser(field_name, url, type, win) {
  var cmsURL = roxyFileman;  // script URL - use an absolute path!
  if (cmsURL.indexOf("?") < 0) {
    cmsURL = cmsURL + "?type=" + type;
  }
  else {
    cmsURL = cmsURL + "&type=" + type;
  }
  cmsURL += '&input=' + field_name + '&value=' + win.document.getElementById(field_name).value;
  tinyMCE.activeEditor.windowManager.open({
    file: cmsURL,
    title: 'Images / Fichiers',
    width: 850, // Your dimensions may differ - toy around with them!
    height: 650,
    resizable: "yes",
    plugins: "media",
    inline: "yes", // This parameter only has an effect if you use the inlinepopups plugin!
    close_previous: "no"
    }, {
    window: win,
    input: field_name
      });
  return false;
}
</script>
    </body>
</html>

Thanks for your help.

</div>
  • 写回答

2条回答 默认 最新

  • dongza5150 2016-06-26 15:02
    关注

    Just write down the name of editor in conf.js

    right now INTEGRATION : "custom" replace it with "INTEGRATION":

    For Roxy Fileman integration with CKEditor set this to "ckeditor", for TinyMCE 3.x set "tinymce3", for TinyMCE 4.x set "tinymce4". For custom implementation set "custom", then fill "FileSelected()" function located in fileman/js/custom.js - for more details see "Roxy Fileman custom integration". The default value is "custom". This setting could be overriden by sending URL parameter "integration" when openning the file browser.

    评论

报告相同问题?

悬赏问题

  • ¥15 高价求中通快递查询接口
  • ¥15 解决一个加好友限制问题 或者有好的方案
  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?