KindEditor 取不到值 与清空不掉值

var editor;
        KindEditor.ready(function(K) {
            editor = K.create('textarea[name="content"]', {
            allowFileManager : true,
            afterBlur: function () { this.sync(); }
            });
            K('button[name=button]').click(function(e) {
                //alert(editor.html());
                editor.sync();
                alert(editor.isEmpty());
                

                alert(editor.html());

            });
        });

//清空值如下:
KindEditor.instances[0].html("");

在编辑完成后,失去焦点 ,同步一下框中的内容 , 然后再.html();取出其中的内容。

转载于:https://www.cnblogs.com/xmmy/p/10682849.html

你可能感兴趣的:(KindEditor 取不到值 与清空不掉值)