//先添加引用
//将ckeditor和ckfinder集成
//把这句话添加到page_load里面
CKFinder.FileBrowser _FileBrowser = new
CKFinder.FileBrowser();
_FileBrowser.BasePath = "/ckfinder/";
_FileBrowser.SetupCKEditor(CKEditor1);//这个参数是根据具体的名字变化的
//如果已经添加ckeditor引用了(可以从neget里面安装)
//下面这句话加到aspx最顶上,就可以创建控件了
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
// 创建控件
<CKEditor:CKEditorControl ID="CKEditor1" BasePath="/ckeditor/" runat="server"></CKEditor:CKEditorControl>
//如果要使用ckfinder来上传图片等
//要记得把usersFiles文件夹里面的config.ascx
public override bool CheckAuthentication()
{
// WARNING : DO NOT
simply return "true". By doing so, you are allowing
// "anyone" to upload
and list the files in your server. You must implement
// some kind of
session validation here. Even something very simple
as...
//
// return ( Session[ "IsAuthorized" ] != null &&
(bool)Session[ "IsAuthorized" ] == true );
//
// ... where Session[
"IsAuthorized" ] is set to "true" as soon as the
// user logs on your
system.
return true;//这里要改成return
true;
}
ckeditor和ckfinder相关知识,布布扣,bubuko.com
原文:http://www.cnblogs.com/karlzhao/p/3663164.html