首页 > 解决方案 > 将 Ckfinder 与 Serenity 平台集成

问题描述

我尝试整合CKfinder。我按照问题 #4994中的步骤进行操作,但最后出现如下错误。我需要改变什么?

namespace PM.Common {
@Serenity.Decorators.registerEditor()
export class MyHtmlContentEditor extends Serenity.HtmlContentEditor {
    constructor(textArea: JQuery, opt?: Serenity.HtmlContentEditorOptions) {
        super(textArea, opt);
    }
    protected getConfig(): Serenity.CKEditorConfig {
        var config:any = super.getConfig();
        config.uiColor = '#AADC6E';
        config.allowedContent = true;
        config.autoParagraph = false;
        config.filebrowserBrowseUrl = '/Scripts/ckfinder/ckfinder.html';
        config.filebrowserImageBrowseUrl = '/Scripts/ckfinder/ckfinder.html?type=Images';
        config.filebrowserUploadUrl = '/Scripts/ckfinder/connector?command=QuickUpload&type=Files';
        config.filebrowserImageUploadUrl = '/Scripts/ckfinder/connector?command=QuickUpload&type=Images';
        return config;
    }
}

}

错误信息

标签: ckfinderserenity-platform

解决方案


我没有在我的项目中使用 ckfinder,但我猜你错过了,也需要添加一些配置。检查 ckeditor 文档。https://ckeditor.com/docs/ckfinder/ckfinder3-net/integration.html

文档也取决于您使用的版本。


推荐阅读