我正在为这种集成而苦苦挣扎。非常感谢您的帮助。
我只希望在图像对话框的链接选项卡上有文件浏览器选项。此外,我希望它默认到一个特定的文件夹。
我已经下载了文件浏览器和弹出插件(4.3标准版没有在插件文件夹中列出它们),并用以下命令修改了config.js:
// enable plugin
config.extraPlugins = 'filebrowser';
config.extraPlugins = 'popup';我从一个include(contentEditor.js)调用CK实例
var config3 = {
toolbar:
[
[ 'Paste', 'PasteFromWord', '-', 'Bold', 'Italic', 'Underline', '-', 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Source' , 'Templates', 'Link', 'Image' ]
],
uiColor: "#dafb3f",
height: "570px",
resize_enabled: false,
extraPlugins:'templates,filebrowser,popup',
on: { change: CKonChange }
};
// Initialize the editor.
// Callback function can be passed and executed after full instance creation.
$( 'textarea#nodeContents' ).ckeditor(config3); // nodeContents for city,state,country,resources editors
});现在,我迷路了。如何激活浏览器按钮,并将镜像路径传回实例?
1/28更新
由于我找不到任何关于如何集成文件浏览器插件的文档,我正在考虑集成一个自定义的浏览脚本。
因此,在我的config.js fle中,我有:
// Custom template files referenced in this array
config.templates_files = [ 'http://dev.wtpcentral.com/js/CK_templates_city.js' ];
// Image browser
config.filebrowserImageBrowseLinkUrl : "/include/filebrowser/browse.php?type=Images&dir="+encodeURIComponent('content/images');
// config.filebrowserImageBrowseUrl : "/include/filebrowser/browse.php?type=Images&dir="+encodeURIComponent('content/images');
// Custom Image upload
config.filebrowserUploadUrl ='/include/classUpload/upload_CK.php';
// enable plugin
// config.extraPlugins = 'filebrowser,popup';然后,我将文件放入我的/ browse.php /filebrowser文件夹。
但是,这会抛出一个错误: SyntaxError: invalid label config.filebrowserImageBrowseUrl:"/include/filebrowser/browse.php
并且我的自定义图像上传脚本现在无法加载。
正如您可能在我的内联注释中看到的那样,我尝试了config.filebrowserImageBrowseUrl,并获得了相同的结果。
非常感谢您的帮助。
发布于 2014-02-07 07:02:58
在这种情况下,您必须使用"=“而不是":”。更改此行
config.filebrowserImageBrowseLinkUrl: "/include/filebrowser/browse.php?type=Images&dir="+encodeURIComponent('content/images');至
config.filebrowserImageBrowseLinkUrl = "/include/filebrowser/browse.php?type=Images&dir="+encodeURIComponent('content/images');https://stackoverflow.com/questions/21317227
复制相似问题