您的位置:首页 > 其它

KindEditor 无法设置内容解决办法

2017-10-21 11:54 316 查看
看到很多人编辑器无法设置内容。把解决的问题写在上面。

不能用$("#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();

});

更多0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  KindEditor
相关文章推荐