在编辑表单页面添加引用的js
<script charset="utf-8" src="../kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="../kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="../kindeditor/plugins/code/prettify.js"></script>
<script>
KindEditor.ready(function (K) {
var editor1 = K.create('#content', {
cssPath: '../kindeditor/plugins/code/prettify.css',
uploadJson: '../kindeditor/upload_json.ashx',
fileManagerJson: '../kindeditor/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>
form表单中
<asp:TextBox id="content" name="content" runat="server" TextMode="MultiLine" cols="100" rows="8" style="width:100%height:300px"></asp:TextBox>
文本域的id和var editor1 = K.create('#content', {里面的#后的相同
然后后台接受数据时直接取content的值就行了
实际上就是保存 textarea 到oracle 的CLOB字段中,显示直接在html页面就可以了。用hibernate 做数据库持久化的话,可以直接映射成string类型就行数据库层 *** 作。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)