You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
775 B
JavaScript
28 lines
775 B
JavaScript
5 years ago
|
/*******************************************************************************
|
||
|
* KindEditor - WYSIWYG HTML Editor for Internet
|
||
|
* Copyright (C) 2006-2011 kindsoft.net
|
||
|
*
|
||
|
* @author Roddy <luolonghao@gmail.com>
|
||
|
* @site http://www.kindsoft.net/
|
||
|
* @licence http://www.kindsoft.net/license.php
|
||
|
*******************************************************************************/
|
||
|
|
||
|
KindEditor.plugin('autoheight', function(K) {
|
||
|
var self = this;
|
||
|
|
||
|
if (!self.autoHeightMode) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var edit = self.edit;
|
||
|
var body = edit.doc.body;
|
||
|
var minHeight = K.removeUnit(self.height);
|
||
|
|
||
|
edit.iframe[0].scroll = 'no';
|
||
|
body.style.overflowY = 'hidden';
|
||
|
|
||
|
edit.afterChange(function() {
|
||
|
self.resize(null, Math.max((K.IE ? body.scrollHeight : body.offsetHeight) + 62, minHeight));
|
||
|
});
|
||
|
});
|