Use kindeditor get less than the value of the rich text box

The rich get less than the value of the text box, and a bunch of online search, but in the end few can solve the problem, toss some final settlement. Note that the code is red, then you can solve the problem together.

 

    KindEditor.ready(function (K) {
        var editor1 = K.create('#AContents', {
            cssPath: '/Content/kindeditor/plugins/code/prettify.css',
            uploadJson: '/Content/kindeditor/asp.net/upload_json.ashx',
            //uploadJson:'/WeXin/Article/ProcessRequest',
            fileManagerJson: '/Content/kindeditor/asp.net/file_manager_json.ashx',
            //fileManagerJson:'/WeXin/Article/ProcessRequest2',
            allowFileManager: true,
            afterCreate:were() {
                function 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();
                });
            },
            afterBlur: function () { this.sync(); } 
        });
        prettyPrint();
    });

 

Guess you like

Origin www.cnblogs.com/youmingkuang/p/11241479.html