Các bước để tích hợp CKFinder vào CEditor
1/ Download ckfinder
2/ Download ceditor
3/ copy ckfinder, ceditor vào thư mục con của web site. Ví dụ: myweb/ckfinder, myweb/ceditor
4/ copy 2 file ckeditor.dll, ckfinder.dll vào thư mục Bin của web site
5/ Thay đổi thông tin trong config.ascx trong ckfinder như sau:
public override bool CheckAuthentication()
{
…
// user logs on your system.
return true;
}
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 = “~/Images”; // chỉ ra đường dẫn của thư mục ảnh
…
}
6/ Add CEditor control vào trang web, ví dụ đặt tên là editor1.
7/ Viết đoạn mã sau vào sự kiện form_load của các trang có dùng ceditor
protected void Page_Load(object sender, EventArgs e)
{
CKFinder.FileBrowser _fb = new FileBrowser();
_fb.BasePath = “ckfinder/”;
_fb.SetupCKEditor(this.editor1);
…
}
Trên đây là 7 bước để tích hợp CKFinder vào ceditor.