原文见曾祥展的博客,做了一些细化和删改。

1,将ckeditor解压打开,打开_Samples,将ckeditor文件夹拷贝项目中的根目

录下

2,将ckfinder解压,ckfinder文件夹拷贝项目中的根目录下,把_sample,

_source,help文件夹删除掉,(注:没有用)

3.添加CKFinder.dll和CKEditor.NET.dll引用

4.在工具箱中添加CKEditorControl工具

5.将CKEditorControl工具拖入到aps.net页面中,并在页面的后台代码中加入

using CKFinder引用。并写入如下代码:
 protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser _filebowser = new FileBrowser();
            _filebowser.SetupCKEditor(this.CKEditorControl1);

//CKEditor控件内就可使用CKFinder了
            //_filebowser.BasePath = "/ckfinder/";
        }

6.修改ckfinder/config.ascx 文件内容:
public override bool CheckAuthentication()
{
 //return false; 改这里
   // return HttpContext.Current.User.Identity.IsAuthenticated; 更安全
    return true;
}

SetConfig():

 BaseUrl = "~/ckfinder/userfiles/"; //此处设定客户端上传的文件

储存在服务器的哪个文件夹内。如:BaseUrl = "~/uploadfiles/";

 

7.使用CKEditorControl1.Text获取编辑器内容 

相关文章:

  • 2021-11-20
  • 2021-11-29
  • 2021-04-24
  • 2022-12-23
  • 2022-02-25
  • 2021-09-25
  • 2022-12-23
  • 2021-12-04
猜你喜欢
  • 2021-10-08
  • 2021-06-17
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2022-01-27
相关资源
相似解决方案