下载地址:http://kindeditor.net/down.php

解压放在项目要目录下,

在Bin目录下添加引用:LitJSON.dll

在页面头部加:

<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('#content1', {
cssPath: '../kindeditor-4.1.10/plugins/code/prettify.css',
uploadJson: '../kindeditor-4.1.10/asp.net/upload_json.ashx',
fileManagerJson: '../kindeditor-4.1.10/asp.net/file_manager_json.ashx',
allowFileManager: true,
afterCreate: function () {
var self = this;
K.ctrl(document, , function () {
self.sync();
K('form[name=example]')[].submit();
});
K.ctrl(self.edit.doc, , function () {
self.sync();
K('form[name=example]')[].submit();
});
}
});
prettyPrint();
});
</script>

页面内容:

<li class="t4"><asp:TextBox ID="content1" runat="server"  Width="" Height=""  CssClass="textBox"></asp:TextBox></li>
<li class="t5">
<asp:Button ID="btnSend" runat="server" Text="上 传" CssClass="mBtn" OnClientClick="return CheckTextBox()" OnClick="btnSend_Click"/>
</li>

后台代码:

protected void btnSend_Click(object sender, EventArgs e) {
if (this.content1.Text.Trim().Length == ) {
HelperJS.Show(this.Page, "描述内容不能为空!");
return;
}
else
SaveDataInfo();
}
protected void SaveDataInfo() {
string judge = Request.QueryString["action"]; //如果action为空,表示发布,action为e表示更新
if (string.IsNullOrEmpty(judge)) {
string sql = "insert into aboutus (typeName,aboutContent) values ('" + txtCName.Text.Trim() + "','" + content1.Text.Trim() + "')";
if (Helper.HelperExecuteSql.ExecuteSql(sql) > ) {
HelperJS.Show(this.Page, "发布成功!");
return;
}
else {
Helper.HelperJS.Show(this.Page, "发布失败!");
return;
}
}
if (judge == "e") { string sql = "update aboutus set typeName='" + txtCName.Text.Trim() + "',aboutContent='" + content1.Text.Trim() + "' where ID='" + Request.QueryString["id"].ToString() + "'";
if (Helper.HelperExecuteSql.ExecuteSql(sql) > ) {
HelperJS.Show(this.Page, "更新成功!");
return;
}
else {
Helper.HelperJS.Show(this.Page, "更新失败!");
return;
}
}
}

在线富文本编辑器kindeditor配置(.Net Framework 3.5)的更多相关文章

  1. 富文本编辑器kindeditor配置

    <!--富文本编辑器kindeditor配置↓ --> <link type="text/css" rel="stylesheet" href ...

  2. 在线富文本编辑器FckEditor配置(.Net Framework 3.5)

    进入FCKeditor文件夹,编辑 fckconfig.js 文件.1.上传设置  .  var _FileBrowserLanguage         = 'php' ;         // a ...

  3. easyUI整合富文本编辑器KindEditor详细教程(附源码)

    原因 在今年4月份的时候写过一篇关于easyui整合UEditor的文章Spring+SpringMVC+MyBatis+easyUI整合优化篇(六)easyUI与富文本编辑器UEditor整合,从那 ...

  4. 富文本编辑器 KindEditor 的基本使用 文件上传 图片上传

    富文本编辑器 KindEditor 富文本编辑器,Rich Text Editor , 简称 RTE , 它提供类似于 Microsoft Word 的编辑功能. 常用的富文本编辑器: KindEdi ...

  5. MVC5富文本编辑器CKEditor配置CKFinder

    富文本编辑器CKEditor的使用 *:first-child { margin-top: 0 !important; } body>*:last-child { margin-bottom: ...

  6. python 全栈开发,Day83(博客系统子评论,后台管理,富文本编辑器kindeditor,bs4模块)

    一.子评论 必须点击回复,才是子评论!否则是根评论点击回复之后,定位到输入框,同时加入@评论者的用户名 定位输入框 focus focus:获取对象焦点触发事件 先做样式.点击回复之后,定位到输入框, ...

  7. 富文本编辑器 CKeditor 配置使用+上传图片

    参考文献: 富文本编辑器 CKeditor 配置使用 CKEditor与CKFinder的配置(ASP.NET环境),老版本可以参考 CKEditor+CKFinder ASP版在本地电脑中的配置  ...

  8. Django配置富文本编辑器kindeditor

    一.简介 django是一个容易快速上手的web框架,用它来创建内容驱动型的网站(比如独立博客)十分方便.遗憾的是,django并没有提供官方的富文本编辑器,而后者恰好是内容型网站后台管理中不可或缺的 ...

  9. Django之富文本编辑器kindeditor 及上传

    1.什么是富文本编辑器 百度百科(https://baike.baidu.com/item/%E5%AF%8C%E6%96%87%E6%9C%AC%E7%BC%96%E8%BE%91%E5%99%A8 ...

随机推荐

  1. P2P行业专业术语(最全)

    网贷:P2P网络借款,指个体与个体之间通过网站实现借贷,中间网站称为网贷平台,简称平台. 角色类 投资者:在网站上把钱借出去的用户,年龄必须是18周岁以上具有中国国籍的公民. 借款者(贷款者):是指有 ...

  2. C++ 第一个C++程序

    #include <iostream> // C++自带的标准头文件都是没有.h的 // 就相当于C语言的<stdio.h> // 提前使用命名空间std using name ...

  3. Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for …

    编译通过并且运行web成功后,访问的页面不需要连接数据库,不牵扯到反射调用实体类就不会报错, 报错内容如下: [WARNING] org.springframework.web.util.Nested ...

  4. C和CPP关于条件运算符的区别

    条件运算符形式: cond ? expr1 : expr2; 在C语言中执行过程是: 先对cond求值,值为真返回expr1的值,否则返回expr2的值.(右值) gcc测试结果: 在Cpp中如果两个 ...

  5. [嵌入式开发板]iTOP-4412开发板linux 系统存储空间的修改

    平台:iTOP-4412开发板 这里我们以修改成 1G 存储空间为例来讲解修改方法, 如果需要改 成其他大小的存储空间,参照此方法修改即可. 首先连接好 iTOP-4412 开发板的调试串口到 pc  ...

  6. uva 1471 defence lines——yhx

    After the last war devastated your country, you - as the king of the land of Ardenia - decided it wa ...

  7. Unity-WIKI 之 DrawArrow

    组件作用 Unity画方向箭头类库,在Scene视图或在Game视图打开Gizmos查看效果 效果预览   wiki地址 http://wiki.unity3d.com/index.php/DrawA ...

  8. C# 程序性能提升篇-1、装箱和拆箱,枚举的ToString浅析

    前景提要: 编写程序时,也许你不经意间,就不知不觉的使程序代码,发生了装箱和拆箱,从而降低了效率,不要说就发生那么一次两次,如果说是程序中发生了循环.网络程序(不断请求处理的)等这些时候,减少装箱和拆 ...

  9. Android 动态加载 (一) 态加载机制 案例一

    在目前的软硬件环境下,Native App与Web App在用户体验上有着明显的优势,但在实际项目中有些会因为业务的频繁变更而频繁的升级客户端,造成较差的用户体验,而这也恰恰是Web App的优势.本 ...

  10. 25个实用的jquery技巧

    1. 去除页面的右键菜单   $(document).ready(function(){ $(document).bind(“contextmenu”,function(e){returnfalse; ...