【发布时间】:2013-08-07 04:42:24
【问题描述】:
我正在使用与 ckeditor (ckeditor inline) 集成的 kcfinder 来上传图像并进行选择。通过单击浏览服务器按钮选择图像时,它按预期显示图像。但是当我右键单击图像时,它没有显示选择,选择缩略图选项,并且图像没有通过双击图像插入到模板中。
请帮助我弄清楚该功能。
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