.net的文本编辑感觉很少,有的也要付费,今天找了一个CuteEditor,虽然也是付费的,但是网上有破解的License文件。
部署步骤(基本不变,.NET1.1和2.0版本部署基本一致):
1. 安装CuteEditor assembly 文件和license文件(共4个)
拷贝以下文件到您网站的bin文件夹下
CuteEditor.dll
CuteEditor.ImageEditor.dll
NetSpell.SpellChecker.dll
CuteEditor.lic (license文件)
2.拷贝CuteEditor 客户端文件
拷贝“CuteSoft_Client”文件夹到您的网站目录下(根目录),大约有4.57MB(.NET 2.0版本)。
3.复制样式css文件到您网站的根目录
example.css
4.增加httpModule 到您的web.config中
(1)IIS 5.0, 6.0 和 IIS 7.0 标准模式(Classic mode)
<configuration>
<system.web>
<httpModules>
<add name="CuteEditor.UploadModule" type="CuteEditor.UploadModule,CuteEditor"/>
</httpModules>
</system.web>
</configuration>
(2)IIS 7.0集成模式(Integrated mode)
<configuration>
<system.webServer>
<modules>
<add name="CuteEditor.UploadModule" type="CuteEditor.UploadModule,CuteEditor"/>
</modules>
</system.webServer>
</configuration>
5.注册CuteEditor到您的页面。
如下:
<%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
6.控件使用代码如下
<CE:EDITOR id="Editor1" runat="server"
EditorWysiwygModeCss="~/example.css" Width="100%"
Height="380px" AutoConfigure="Simple" FilesPath="~/CuteSoft_Client/CuteEditor/">
</CE:EDITOR>
7.取值方法
this.Editor1.Text;
CuteEditor下载:http://www.51aspx.com/CV/cuteEditor64/
如果按照提示做,发现提示说License文件过期,那就到下面找License文件,如果还是过期,那就baidu去吧!
License文件下载:http://files.cnblogs.com/midea0978/CuteEditor.rar