KindEditor的setHeight方法

KindEditor默认是没有setHeight()方法的。通过一下方式添加setHeight方法

KindEditor.EditorClass.prototype.setHeight = function(height){
        var self = this;
        var tbar = $(self.container.children()[0]);
        var statusbar = $(self.container.children()[2]);
        var editHei = height - tbar.height() - statusbar.height();
        var edit = $(self.container.children()[1]);
        var editTxtares = $(edit.children()[1]);
        if(editHei > 0){
            edit.height(editHei);
            editTxtares.height(editHei);
        }
    };


文章出自http://wensiqun.iteye.com/blog/1733607

你可能感兴趣的:(kindeditor,html编辑器,setHeight)