diff --git a/public/assets/kindeditor/plugins/autoheight/autoheight.js b/public/assets/kindeditor/plugins/autoheight/autoheight.js index 546578bfa..3c25fe49e 100644 --- a/public/assets/kindeditor/plugins/autoheight/autoheight.js +++ b/public/assets/kindeditor/plugins/autoheight/autoheight.js @@ -27,7 +27,9 @@ KindEditor.plugin('autoheight', function(K) { var edit = self.edit; var body = edit.doc.body; edit.iframe.height(minHeight); - self.resize(null, Math.max((K.IE ? body.scrollHeight : body.offsetHeight) + 76, minHeight)); + self.resize(null, Math.max( + (K.IE ? body.scrollHeight : body.offsetHeight) + + 76, minHeight)); } function init() { @@ -35,7 +37,12 @@ KindEditor.plugin('autoheight', function(K) { self.edit.afterChange(resetHeight); hideScroll(); - resetHeight(); + var edit = self.edit; + var body = edit.doc.body; + edit.iframe.height(minHeight); + self.resize(null, Math.max( + ((K.IE ? body.scrollHeight : body.offsetHeight) > 500 ? 500 : (K.IE ? body.scrollHeight : body.offsetHeight)) //限制初始化太高的情况 + + 76, minHeight)); } if (self.isCreated) {