防止生成的kindeditor太高
This commit is contained in:
parent
2beb85561a
commit
8848b3975e
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue