在sailsjs中使用ckeditor但是filebrowser不能正常工作

时间:2016-04-06 09:52:27

标签: ckeditor sails.js ckfinder

我在sailsjs中使用ckeditor最新版本和完整包。我正在使用来自服务器功能的文件浏览。

//ckeditor/config.js

CKEDITOR.editorConfig = function( config ) {
    config.filebrowserBrowseUrl = '/files';
};

assets / files文件夹中有很多图像。当我点击浏览服务器时,会打开一个新标签,网址为http://example.com/files?CKEditor=ck&CKEditorFuncNum=1&langCode=en

但我得到默认未找到的屏幕。但是,如果我从像http://example.com/files/ok.png这样的网址访问图片。我可以在浏览器中看到它。但是如果我要求http://example.com/files。我需要查看文件夹中的图像列表。我需要的是以下或文件浏览器。enter image description here

1 个答案:

答案 0 :(得分:1)

您提供的屏幕显示CKFinder文件管理器,可以轻松与CKEditor集成。 CKFinder工作需要服务器端连接器 - 遗憾的是,目前没有node.js的连接器。

您可能会发现CKEditor File Browser API很有用,因为它允许集成任何其他文件浏览器。有关sails.js中的基本用法,请参阅this answer