From 5ea618b52082db27d8251342338aedf0c769a4f8 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Thu, 10 Mar 2016 11:16:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9KE=E6=8F=92=E5=85=A5=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=B2=A1=E6=98=BE=E7=A4=BA=E5=AE=8C=E5=85=A8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/kindeditor.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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); }