diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 6da24733c..2d164f0ba 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -5646,6 +5646,26 @@ _plugin('core', function(K) { }else{ //TODO 暂时什么也不做 } + var _bod = $(self.cmd.doc.body); + var body = self.cmd.doc.body; + var _bw = _bod.width(),_bh = Math.max((K.IE ? body.scrollHeight : (K.GECKO ? body.offsetHeight+26:body.offsetHeight))); + var _bsh = 0; + _bod.children().each(function(){ + _bsh += $(this).height(); + }); + var _imgbase = _bod.find("img"); + _imgbase[0].onload = function(){ + var _iw=_imgbase.width(),_ih = _imgbase.height(); + var _alh = _bsh + _ih; + var _rhig = _alh > _bh ? _alh : _bh; + switch(self.resizeType){ + case 1: + var _defh = self.toolbar.div.height() + self.statusbar.height(); + _defh = _defh > 0 ? _defh + 6 : _defh; + self.resize(null,_rhig + _defh); + break; + } + } } else { alert(data.message); }