在ASP中 使用 kindeditor-4.1.4编辑器的详细教程
2015-01-15 13:27
253 查看
1、去官网下载最新版本:kindeditor-4.1.4编辑器
下载地址:http://kindeditor.net/down.php
2、将下载的包放在网站根目录下面
4、配置文件图片上传目录,如果目录在UploadFile下
3、配置调用,官方已给出调用文档 asp/deom.asp里面
4、在自己的项目中使用:
//后台ASP文档
<!-- 编辑器字符过滤 -->
<%
Function htmlspecialchars(str)
str = Replace(str, "&", "&")
str = Replace(str, "<", "<")
str = Replace(str, ">", ">")
str = Replace(str, """", """)
htmlspecialchars = str
End Function
%>
<textarea name="Content" style="width:700px;height:400px;visibility:hidden;"><%=htmlspecialchars(htmlData)%></textarea>
<textarea name="Contentb" style="width:700px;height:400px;visibility:hidden;"><%=htmlspecialchars(htmlData)%></textarea>
<textarea name="Contentc" style="width:700px;height:400px;visibility:hidden;"><%=htmlspecialchars(htmlData)%></textarea>
下载地址:http://kindeditor.net/down.php
2、将下载的包放在网站根目录下面
4、配置文件图片上传目录,如果目录在UploadFile下
3、配置调用,官方已给出调用文档 asp/deom.asp里面
4、在自己的项目中使用:
<!-- 配置编辑器 --> <link rel="stylesheet" href="../kindeditor-4.1.10/themes/default/default.css" /> <link rel="stylesheet" href="../kindeditor-4.1.10/plugins/code/prettify.css" /> <script charset="utf-8" src="../kindeditor-4.1.10/kindeditor.js"></script> <script charset="utf-8" src="../kindeditor-4.1.10/lang/zh_CN.js"></script> <script charset="utf-8" src="../kindeditor-4.1.10/plugins/code/prettify.js"></script> <script> KindEditor.ready(function(K) { var editor1 = K.create('textarea[name="Content"]', { cssPath : '../kindeditor-4.1.10/plugins/code/prettify.css', uploadJson : '../kindeditor-4.1.10/asp/upload_json.asp', fileManagerJson : '../kindeditor-4.1.10/asp/file_manager_json.asp', allowFileManager : true, afterCreate : function() { var self = this; K.ctrl(document, 13, function() { self.sync(); K('form[name=example]')[0].submit(); }); K.ctrl(self.edit.doc, 13, function() { self.sync(); K('form[name=example]')[0].submit(); }); },afterBlur:function(){ this.sync(); } }); var editor2 = K.create('textarea[name="Contentb"]', { cssPath : '../kindeditor-4.1.10/plugins/code/prettify.css', uploadJson : '../kindeditor-4.1.10/asp/upload_json.asp', fileManagerJson : '../kindeditor-4.1.10/asp/file_manager_json.asp', allowFileManager : true, afterCreate : function() { var self = this; K.ctrl(document, 13, function() { self.sync(); K('form[name=example]')[0].submit(); }); K.ctrl(self.edit.doc, 13, function() { self.sync(); K('form[name=example]')[0].submit(); }); },afterBlur:function(){ this.sync(); } }); var editor3 = K.create('textarea[name="Contentc"]', { cssPath : '../kindeditor-4.1.10/plugins/code/prettify.css', uploadJson : '../kindeditor-4.1.10/asp/upload_json.asp', fileManagerJson : '../kindeditor-4.1.10/asp/file_manager_json.asp', allowFileManager : true, afterCreate : function() { var self = this; K.ctrl(document, 13, function() { self.sync(); K('form[name=example]')[0].submit(); }); K.ctrl(self.edit.doc, 13, function() { self.sync(); K('form[name=example]')[0].submit(); }); },afterBlur:function(){ this.sync(); } }); prettyPrint(); }); </script>
//后台ASP文档
<!-- 编辑器字符过滤 -->
<%
Function htmlspecialchars(str)
str = Replace(str, "&", "&")
str = Replace(str, "<", "<")
str = Replace(str, ">", ">")
str = Replace(str, """", """)
htmlspecialchars = str
End Function
%>
<textarea name="Content" style="width:700px;height:400px;visibility:hidden;"><%=htmlspecialchars(htmlData)%></textarea>
<textarea name="Contentb" style="width:700px;height:400px;visibility:hidden;"><%=htmlspecialchars(htmlData)%></textarea>
<textarea name="Contentc" style="width:700px;height:400px;visibility:hidden;"><%=htmlspecialchars(htmlData)%></textarea>
相关文章推荐
- asp.net MVC使用kindeditor编辑器
- 在线编辑器 KindEditor 在ASP.NET MVC 中使用
- 在asp.net中KindEditor编辑器的使用总结
- KindEditor编辑器在ASP.NET中的使用
- jQuery编辑器KindEditor4.1.4代码高亮显示设置教程
- jQuery编辑器KindEditor4.1.4代码高亮显示设置教程
- kindeditor在线HTML编辑器简单使用教程
- kindeditor4.1.4 asp.net C# 配置及相关使用技巧 附带读取txt文本方法
- ASP.net 中使用Flexigrid详细教程之一,基本使用
- ASP.net 中使用Flexigrid详细教程之三--在Flexigrid中使用自定义搜索条件
- ASP.net 中使用Flexigrid详细教程之二-直接使用数据库数据(有图有真相)
- kindeditor4.1.4 asp.net C# 配置及相关使用技巧 附带读取txt文本方法
- asp.net MVC使用kindeditor编辑器
- 详细介绍如何使用kindEditor编辑器
- 在asp.net中KindEditor编辑器的使用总结
- 编辑器kindeditor 在Asp.net中的使用
- ASP.net 中使用Flexigrid详细教程之三--在Flexigrid中使用自定义搜索条件
- 【HTML】KindEditor编辑器在ASP.NET中使用
- ASP.NET一款免费富文本(RichText)编辑器KindEditor,实现在线排版编辑文章。这里简单介绍下如何使用