KindEditor无法设置内容的处理办法

do_you_love_me 2017-10-21 11:50:58
看到很多人编辑器无法设置内容。把解决的问题写在上面。
不能用$("#Editor_XieYiNeiRong").html("helllo"); 或则$("#Editor_XieYiNeiRong").val("helllo"); 等形式。
希望能帮助到你。

editor_Editor_XieYiNeiRong.html(unescape(data[0].协议内容));
变量设置如下
var editor_Editor_XieYiNeiRong;
KindEditor.ready(function(K) {
editor_Editor_XieYiNeiRong = K.create('#Editor_XieYiNeiRong', {
cssPath: '/kindeditor/plugins/code/prettify.css',
uploadJson: urluploadimg, //'/ajax/UploadHandlerPhoto.aspx', // '/ajax/upload_json.ashx',处理图片的程序
fileManagerJson: '/ajax/file_manager_json.ashx',
allowFileManager: false,//true
filterMode: true,
urlType: "",
afterCreate: function() {
var self = this;
K.ctrl(document, 13, function() {
self.sync();
K('form[name=fm_Editor_XieYiNeiRong]')[0].submit();
});
K.ctrl(self.edit.doc, 13, function() {
self.sync();
K('form[name=fm_Editor_XieYiNeiRong]')[0].submit();
});
},
afterLoginOut: function() {
parent.loginagin();
}
});
prettyPrint();
});
...全文
270 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
do_you_love_me 2017-10-21
  • 打赏
  • 举报
回复
重复一下因为帖子必须设置分数。我把解决办法发在上面还要扣我的分,这不合理啊。 看到很多人编辑器无法设置内容。把解决的问题写在上面。 不能用$("#Editor_XieYiNeiRong").html("helllo"); 或则$("#Editor_XieYiNeiRong").val("helllo"); 等形式。 希望能帮助到你。 editor_Editor_XieYiNeiRong.html(unescape(data[0].协议内容)); 变量设置如下 var editor_Editor_XieYiNeiRong; KindEditor.ready(function(K) { editor_Editor_XieYiNeiRong = K.create('#Editor_XieYiNeiRong', { cssPath: '/kindeditor/plugins/code/prettify.css', uploadJson: urluploadimg, //'/ajax/UploadHandlerPhoto.aspx', // '/ajax/upload_json.ashx',处理图片的程序 fileManagerJson: '/ajax/file_manager_json.ashx', allowFileManager: false,//true filterMode: true, urlType: "", afterCreate: function() { var self = this; K.ctrl(document, 13, function() { self.sync(); K('form[name=fm_Editor_XieYiNeiRong]')[0].submit(); }); K.ctrl(self.edit.doc, 13, function() { self.sync(); K('form[name=fm_Editor_XieYiNeiRong]')[0].submit(); }); }, afterLoginOut: function() { parent.loginagin(); } }); prettyPrint(); });

110,537

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧