Intergrate Ckfinder with serenity platform

117 views Asked by At

I try to intergrate CKfinder. I follow the steps in Issue #4994, but in the last, I got an error like below. what should I need to change?

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;
    }
}

}

Error Message

1

There are 1 answers

2
Victor Tomaili On

I didn't use ckfinder in my projects but I guess you miss and need add some configuration too. Check ckeditor documentation for this. https://ckeditor.com/docs/ckfinder/ckfinder3-net/integration.html

Also docs are depend which version do you use.