【问题标题】:Missing select and select thumbnail option in ckeditor 4ckeditor 4中缺少选择和选择缩略图选项
【发布时间】:2013-08-07 04:42:24
【问题描述】:

我正在使用与 ckeditor (ckeditor inline) 集成的 kcfinder 来上传图像并进行选择。通过单击浏览服务器按钮选择图像时,它按预期显示图像。但是当我右键单击图像时,它没有显示选择,选择缩略图选项,并且图像没有通过双击图像插入到模板中。

请帮助我弄清楚该功能。

jsfiddle

CKEDITOR.editorConfig = function( config ) {

config.filebrowserBrowseUrl = '../kcfinder/browse.php?type=images';
config.filebrowserUploadUrl = '../kcfinder/upload.php?type=images';
    config.extraPlugins = 'tokens,htmlSource,link';
    config.removePlugins = 'flash';
    config.baseFloatZIndex = 900;
    config.toolbarGroups = [
    {name: 'sourcedialog'},
    { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
    { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
    { name: 'links' },
    { name: 'insert' },
    { name: 'tools' },
    { name: 'others' },
    '/',
    { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align' ] },
    { name: 'styles' },
    { name: 'colors' },
    { name: 'tokens'},
    { name: 'htmlSource'}
];


};

【问题讨论】:

  • 能否请您尝试发布您的代码,或在 jsfiddle.net 中
  • 嗨,山姆,感谢您的回复。我只给 config.js 文件我已经更改的这个文件。
  • jsfiddle 中给出的代码jsfiddle.net/sudheerEva/ZDDE7
  • 我认为问题在一定程度上是因为这个语句 this.opener.CKEditor.object.tools.callFunction(this.opener.CKEditor.funcNum, fileURL, '');并在我使用 window.opener.CKEDITOR.tools.callFunction(0, fileURL,'') 时工作​​,但这不是通用解决方案
  • 在第 166 行的 Kcfinder 路径 js/browser/files.js 中,它正在检查 this.opener.window 的条件。但是在这个变量中,如果我使用 ckeditor 4 内联编辑器,它是未定义的,如果我使用 ckeditor 3,它会显示价值

标签: php jquery ckeditor kcfinder


【解决方案1】:

遇到上述问题的人

转到路径:

kcfinder\js\browser\files.js

在 219 处添加这两行

else { window.opener.CKEDITOR.tools.callFunction(0, fileURL,'');
窗口.close(); }

会解决问题。

参考资料:

http://docs.ckeditor.com/#!/guide/dev_file_browser_api http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(Uploader)/Custom_File_Browser

【讨论】:

    猜你喜欢
    • 2021-09-25
    • 2012-04-20
    • 2012-04-20
    • 2013-05-31
    • 1970-01-01
    • 2019-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多