当前位置: 代码迷 >> Web前端 >> KindEditor的setHeight步骤
  详细解决方案

KindEditor的setHeight步骤

热度:96   发布时间:2012-12-17 09:31:40.0
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

  相关解决方案