FCKeditor.Net_2.5的使用
fckEditor是一款开源的极好用的文本编辑器.官网(http://www.fckeditor.net/)提供源码下载
一.基于.NET平台fckEditor使用需要下载两个部分(FCKeditor_2.5.1和FCKeditor.Net_2.5.1),前者为编辑器源码,后者为.NET平台应用扩展源码。FCKeditor.Net_2.5.1 只需要将FredCK.FCKeditorV2.dll移至WEB的bin目录下,添加至VS控件工具箱中,FCKeditor_2.5.1包中取fckeditor文件至WEB根目录下。
二.配置
1. .NET web.config文件中配置fckEditor的源文件的位置及文件上传存储路径。
<add key="FCKeditor:BasePath" value="~/fckeditor/"/>
<add key="FCKeditor:UserFilesPath" value="~/upFile/" />
2. fckEditor源文件中的fckconfig.js文件中配置fckEditor的工具栏显示,及默认平台语言,皮肤。
3.图片上传Maxthon弹出窗口不在顶部的解决方法:
打开\FCKeditor\editor\js\fckeditorcode_ie.js
查找
showModalDialog 替换为 showModelessDialog
三.使用
1.取值
通过 fckEditorID.value取值。
2.文件上传
a.注意设置上传目标位置文件的读写权限。
b.若.NET2.0用了Theme 和styleSheetTheme 外观文件,则应在
editor/filemanager/connectors/aspx/connector.aspx 文件和 editor/filemanager/connectors/aspx/upload.aspx文件中部分修改为<%@ Page Language="c#" Trace="false" Theme="" StylesheetTheme="" AutoEventWireup="false"
c.上传权限
在文件 editor/filemanager/connectors/aspx/config.ascx中的方法处理权限问题。如下:
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/dot.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/dot.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)