ASP.NET下在线编辑器FreeTextBox与FCKeditor快速使用

一、FreeTextBox(版本3.2.1)

1、下载FreeTextBox,等到对应 .Net 的版本FreeTextBox.dll;

2、将FreeTextBox.dll复制到项目的bin文件下;

3、右键“引用”->”添加引用“->"浏览",找着FreeTextBox.dll,确定引用FreeTextBox.dll;

4、新建一个aspx页面,先注册一下控件,代码如下(加在@ Page之后):

<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>
5、引用控件的html代码:


6、后端页面控件使用代码如下:

ftbContent.Text = "

wnaghengheng

"; string result = ftbContent.Text;

二、FCKeditor(版本2.2)

1、下载FCKeditor2.4.2.zip和   FCKeditor.NET版的2个zip包,解压得到FCKeditor文件夹及FredCK.FCKeditorV2.dll;

2、将FredCK.FCKeditorV2.dll复制到项目的bin文件下,FCKeditor文件夹复制到项目根目录下,并在项目根目录新建Files文件夹用来存放FCKeditor上传的文件;

3、右键“引用”->”添加引用“->"浏览",找着FredCK.FCKeditorV2.dll,确定引用FredCK.FCKeditorV2.dll;

4、打开项目web.config,在节点下添加以下三项:

    
    
    
5、新建一个aspx页面,先注册一下控件,代码如下(加在@ Page之后):

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
6、引用控件的html代码:


7、后端页面控件使用代码如下:

txtBody.Value = "

wnaghengheng

"; string result = txtBody.Value;

三、使用效果

FreeTextBox截图:

ASP.NET下在线编辑器FreeTextBox与FCKeditor快速使用_第1张图片

FCKeditor截图:

ASP.NET下在线编辑器FreeTextBox与FCKeditor快速使用_第2张图片

注:这里介绍的两个编辑器使用的版本都比较老,新版本可能会有出入,使用时请注意!


你可能感兴趣的:(.NET,FreeTextBox,FCKeditor)