kindeditor 怎么存到数据库,怎么读出
1个回答
展开全部
HTML代码
XML/HTML code?
<script type="text/javascript">
KindEditor.ready(function (K) {
var editor1 = K.create('#editConcent', {
cssPath: '../plugins/code/prettify.css',
uploadJson: '../asp.net/upload_json.ashx',
fileManagerJson: '../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();
html = editor.html();
html = K('#editor_id').val();
});
</script>
<textarea id="editConcent" name="editor" style="width:80%;height:400px" runat="server"></textarea>
<asp:Button ID="OKBtn" runat="server" Text="保存" Width="60px"/>
*.cs代码
C# code?
string sql="select语句"
DataTable dt = new DataTable();
dt = mdf.ExecuteReader(string.Format(sql), CommandType.Text);
string newsConcent= dt.Rows[0]["newsConcent"].ToString().Trim();
XML/HTML code?
<script type="text/javascript">
KindEditor.ready(function (K) {
var editor1 = K.create('#editConcent', {
cssPath: '../plugins/code/prettify.css',
uploadJson: '../asp.net/upload_json.ashx',
fileManagerJson: '../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();
html = editor.html();
html = K('#editor_id').val();
});
</script>
<textarea id="editConcent" name="editor" style="width:80%;height:400px" runat="server"></textarea>
<asp:Button ID="OKBtn" runat="server" Text="保存" Width="60px"/>
*.cs代码
C# code?
string sql="select语句"
DataTable dt = new DataTable();
dt = mdf.ExecuteReader(string.Format(sql), CommandType.Text);
string newsConcent= dt.Rows[0]["newsConcent"].ToString().Trim();
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询