你如果是CSDN的博客,你就一定用过FCKeditor。因为你写文章用的那个编辑器就是FCKeditor.
本文参考下面的2篇文章所写。
1 asp.net 2.0 下设置和使用FCKeditor文本编辑器
只要按照1配置即可。
文件下载我的是FCKeditor.Net_2.2.zip和FCKeditor_2.4.2.zip
1 webconfig.xml的设置:
<appSettings>
<add key="FCKeditor:BasePath" value="~/FCKeditor/"/>
<add key="FCKeditor:UserFilesPath" value="/Hhxx/FckFiles" />
<add key="DatabaseConnStr" value="Data Source=hhxx;User ID=HHSYS;Password=1234;"/>
</appSettings>
2 在根目录Hhxx下建文件夹FckFiles用于存放图像文件
3 在根目录Hhxx下建FCKeditor放置文件
4 建立测试文件
fckeditor.aspx
<%
@ Register TagPrefix
=
"
FCKeditorV2
"
Namespace
=
"
FredCK.FCKeditorV2
"
Assembly
=
"
FredCK.FCKeditorV2
"
%>
<% @ Page Language = " C# " AutoEventWireup = " true " CodeFile = " fckeditor.aspx.cs " Inherits = " fckeditor " ValidateRequest = " false " %>
<! DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.0 Transitional//EN " " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " >
< html xmlns = " http://www.w3.org/1999/xhtml " >
< head runat = " server " >
< title > FCKeditor </ title >
</ head >
< body >
< form id = " form1 " runat = " server " >
< div >
< FCKeditorV2:FCKeditor id = " FCKeditor1 " runat = " server " Height = " 500px " Width = " 600px " ></ FCKeditorV2:FCKeditor >
</ div >
</ form >
</ body >
</ html >
<% @ Page Language = " C# " AutoEventWireup = " true " CodeFile = " fckeditor.aspx.cs " Inherits = " fckeditor " ValidateRequest = " false " %>
<! DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.0 Transitional//EN " " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " >
< html xmlns = " http://www.w3.org/1999/xhtml " >
< head runat = " server " >
< title > FCKeditor </ title >
</ head >
< body >
< form id = " form1 " runat = " server " >
< div >
< FCKeditorV2:FCKeditor id = " FCKeditor1 " runat = " server " Height = " 500px " Width = " 600px " ></ FCKeditorV2:FCKeditor >
</ div >
</ form >
</ body >
</ html >
运行即可。
保存Fckeditor值用Value类型为String.
测试通过