diff --git a/modules/editor/skins/xeed/js/xe_interface.js b/modules/editor/skins/xeed/js/xe_interface.js index 4c1b0a486..e9f595088 100644 --- a/modules/editor/skins/xeed/js/xe_interface.js +++ b/modules/editor/skins/xeed/js/xe_interface.js @@ -20,6 +20,9 @@ function editorStart_xe(editor_seq, primary_key, content_key, editor_height, col // Use auto save feature? opt.use_autosave = !!$form[0].elements['_saved_doc_title']; + + // min height + if (editor_height) opt.height = parseInt(editor_height) || 200; // create an editor xe.Editors[editor_seq] = xeed = new xe.Xeed($textarea, opt); diff --git a/modules/editor/skins/xeed/js/xeed.js b/modules/editor/skins/xeed/js/xeed.js index fbeefcd27..3b1036aa7 100644 --- a/modules/editor/skins/xeed/js/xeed.js +++ b/modules/editor/skins/xeed/js/xeed.js @@ -43,9 +43,13 @@ Xeed = xe.createApp('Xeed', { // Options opts = $.extend({ + height : 200, minHeight : 400 }, options); this._options = opts; + + // min height + if (opts.minHeight > opts.height) opts.minHeight = opts.height; // if ($obj.is('textarea')) { @@ -1729,7 +1733,7 @@ EditMode = xe.createPlugin('EditMode', { */ Resize = xe.createPlugin('Resize', { _fn : null, - prev_height : 400, + prev_height : 0, $resize_bar : null, $auto_check : null, $container : null, @@ -1789,6 +1793,8 @@ Resize = xe.createPlugin('Resize', { }, activate : function() { var $root = this.oApp.$root, chk; + + if (!this.prev_height) this.prev_height = this.oApp.getOption('height'); this.$container = this.oApp.$richedit.parent(); this.$resize_bar = $root.find('button.resize').mousedown(this._fn.down);