你还在使用2.X吗?CKEditor 3.6界面效果很漂亮,功能强大,配置也简单,下面我来介绍一下配置方法:
1.首先到http://ckeditor.com/download官方网站下载最新的CKEditor ,目前的最新版是3.61,下载 CKEditor for ASP.NET。下载完成后,解压压缩包,可以看到提供的例子和bin目录,还有_Samples文件夹。
2.打开你的项目,把_Samples文件夹下的ckeditor文件夹copy到你的项目里面,然后添加引用,寻找到 bin目录下的Release文件夹下的CKEditor.NET.dll,添加引用。
3.在配置文件中添加
<system.web>
<pages>
<controls>
<add tagPrefix="CKEditor" assembly="CKEditor.NET" namespace="CKEditor.NET"/>
</controls>
</pages>
</system.web>
3.在应用到ckeditor的页面引入
<%@Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor"%>
4.在需要用到ckeditor的地方加入
<CKEditor:CKEditorControl ID="CKEditor1" runat="server"></CKEditor:CKEditorControl>
改变颜色:
<CKEditor:CKEditorControl ID="dataContent" runat="server" UIColor="#4e72b8" Language="de" EnterMode="BR">
</CKEditor:CKEditorControl>
修改 UIColor的颜色代码值就可以自定义控件的颜色,效果很好看!
If you want use the CKEditor for ASP.NET Control, you must add references to the project and register the control.
If you only intend to use the control on a single page, you can add a Register section to its source code:
<%@Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor"%>
If you intend to use the control on multiple pages, you can add the Register section in web.config. Insert the following code into the <system.web><pages><controls> section:
<add tagPrefix="CKEditor" assembly="CKEditor.NET" namespace="CKEditor.NET"/>
To insert the CKEditor for ASP.NET Control into a web page, use the following code:
<CKEditor:CKEditorControl ID="CKEditor1" runat="server"></CKEditor:CKEditorControl>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· winform 绘制太阳,地球,月球 运作规律
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 写一个简单的SQL生成工具
· AI 智能体引爆开源社区「GitHub 热点速览」