标签:
下载地址: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, 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();
});
}
});
prettyPrint();
});
</script>
页面内容:
<li class="t4"><asp:TextBox ID="content1" runat="server" Width="1000" Height="600" CssClass="textBox"></asp:TextBox></li>
<li class="t5">
<asp:Button ID="btnSend" runat="server" Text="上 传" CssClass="mBtn" OnClientClick="return CheckTextBox()" OnClick="btnSend_Click"/>
</li>
标签:
原文地址:http://www.cnblogs.com/liuwenbohhh/p/4321319.html