Cấu hình ckfinder với ckeditor

Hướng dẫn dưới đây cấu hình ckfinder với ckeditor trong ASP.NET MVC 5

Thiết lập CKEditor trong MVC View:

@section scripts
{

@Scripts.Render(“~/bundles/jqueryval”)
http://~/ckeditor/ckeditor.js
http://~/ckfinder/ckfinder.js

var editor = CKEDITOR.replace(‘Content’);
CKFinder.setupCKEditor(editor, ‘../ckfinder/’);

}

Cấu hình đường dẫn của ckfinder trong config.ascx

public override void SetConfig()
{
// Paste your license name and key here. If left blank, CKFinder will
// be fully functional, in Demo Mode.
LicenseName = “”;
LicenseKey = “”;

// The base URL used to reach files in CKFinder through the browser.
BaseUrl = “../ckfinder/userfiles/”;

Note: nếu lỡ quên copy ckfinder vào thư mục Bin của ứng dụng thì gặp lỗi sau

Could not load type ‘CKFinder.Connector.Connector’. Could not load type ‘CKFinder.Settings.ConfigFile’. Unknown server tag ‘CKFinder:Config’.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s