在asp.net下快速配置FCKEditor 2.5
来源:互联网 发布:喜马拉雅 人工智能 编辑:程序博客网 时间:2024/05/17 05:13
我的版本:FCKeditor.Net_2.5及FCKeditor_2.6,前者是dll,后者是这个编辑器要使用到的页面,javascript以及配置的信息。
第一步:新建一个项目:FCKEditorTest。
第二步:在工具栏中将FredCK.FCKeditorV2.dll,这个文件在FCKeditor.Net_2.5/bin/Release/2.0目录下,导入后就可以在工具栏上看到FCKEditor这一项了。
第三步:将FCKeditor_2.6目录下的fckeditor目录Copy到网站的根目录下。然后打开fckeditor目录下的fckconfig.js文件,找到以下的变量,将它们的值修改为aspx,如下:
var _FileBrowserLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
第四步:找到fckeditor/editor/filemanager/connectors/aspx/config.ascx文件,将这个控件的CheckAuthentication()函数的返回值改为true,如下:
这一设置是为了允许在编辑器中上传图片
private 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 in your system.
return true;
}
...{
// 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 in your system.
return true;
}
第五步:建立一个保存图片的文件夹,用户上传的图片就保存在这个文件夹中,我在网站的根目录下建立名为UploadImages文件夹。
第六步:配置web.config,在它的appSettings节中加入
FCKEditor就可以使用了
// HTTP Error 404 - Not Found.这个错误的原因就是未使用此设置
<addkey="FCKeditor:BasePath"value="~/fckeditor/"/>
//XML Request Error, Internal Server Error (500)的原因是未使用此设置
<addkey="FCKeditor:UserFilesPath"value="~/fckeditor/ UploadImages /"/>
<addkey="FCKeditor:BasePath"value="~/fckeditor/"/>
//XML Request Error, Internal Server Error (500)的原因是未使用此设置
<addkey="FCKeditor:UserFilesPath"value="~/fckeditor/ UploadImages /"/>
完成以上简单的设置后,
- 在asp.net下快速配置FCKEditor 2.5
- FCKeditor在asp.net 下的配置
- FCKEditor在Asp.net环境下的配置安装
- FCKEditor在Asp.net环境下的配置安装
- ASP.net下配置FCKeditor控件
- Asp.net下 FCKEditor 配置详解
- FCKeditor在Asp.Net中的配置
- FCKeditor在ASP.NET中的配置方法
- 在asp.net2.0下配置FCKeditor
- 在asp.net2.0下配置FCKeditor
- FCKEditor asp.net配置
- asp.net Fckeditor配置
- FCKeditor+ASP.NET配置
- asp.net Fckeditor配置
- FCKeditor asp.net配置
- ASP.NET下在线编辑器FreeTextBox与FCKeditor快速使用
- Fckeditor 2.5 for asp.net配置详解
- asp.net下的fckeditor配置及优化
- Excel计算个人所得税的计算公式:
- 计算机类核心期刊投稿的一些资料汇总
- c#中的抽象类应用
- C#通用编码规范
- 不想当架构师的程序员不是好程序员
- 在asp.net下快速配置FCKEditor 2.5
- java左移、右移、无符号右移
- XP SP3中文版在Microsoft Update上放出来了
- 建表范范例,仅供自己备忘
- Access 的 Label 控件换行和 Excel 的单元格换行
- 软考软件设计师考试大纲
- 笔记本bios设置教程(图)
- 4月6日郎咸平在吉林大学的演讲
- 一个简单的用户登陆系统