如图所示文本编辑器 1.添加js引用
<script src="../Content/assets/plugins/kindeditor/kindeditor-all-min.js"></script> <script src="../Content/assets/plugins/kindeditor/lang/zh_CN.js"></script>2.textbox控件,控制行数
<asp:TextBox ID="txtRemark" runat="server" CSSClass="form-control ie_widthauto" Rows="10" Style="width: 700px; height: 500px;" TextMode="MultiLine"></asp:TextBox>3.JQuery控制
var editor; KindEditor.ready(function (K) { editor = K.create('textarea[name="txtRemark"]', { allowFileManager: true, afterCreate: function () { var self = this; self.sync(); $("#spanddl").mouSEOver(function () { editor.sync(); }); } }); });4.后台代码
1.赋值给数据库recepInfo.Remark = txtRemark.Text.Replace("<", "[").Replace(">", "]").Replace(" ", "");2.从数据库中获取值this.txtRemark.Text = recepInfo.Remark.Replace("[", "<").Replace("]", ">");新闻热点
疑难解答