Files
sogo/UI/WebServerResources/ckeditor/plugins/autogrow/plugin.js
Wolfgang Sourdeau ec40f455c4 Monotone-Parent: 5373dfc5c3226373ee07463504c8e41f06201524
Monotone-Revision: 773d2f54b9bda91cde8db9efc3ee7828e95535de

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-08-27T20:39:50
Monotone-Branch: ca.inverse.sogo
2010-08-27 20:39:50 +00:00

7 lines
831 B
JavaScript

/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function(){var a=function(b){var c=b.document,d=b.window.getViewPaneSize().height,e;if(CKEDITOR.env.ie)e=c.getBody().$.scrollHeight+24;else e=c.getDocumentElement().$.offsetHeight;var f=b.config.autoGrow_minHeight,g=b.config.autoGrow_maxHeight;f==undefined&&(b.config.autoGrow_minHeight=f=200);if(f)e=Math.max(e,f);if(g)e=Math.min(e,g);if(e!=d){e=b.fire('autoGrow',{currentHeight:d,newHeight:e}).newHeight;b.resize(b.container.getStyle('width'),e,true);}};CKEDITOR.plugins.add('autogrow',{init:function(b){for(var c in {contentDom:1,key:1,selectionChange:1,insertElement:1})b.on(c,function(d){if(d.editor.mode=='wysiwyg')setTimeout(function(){a(d.editor);},100);});}});})();