Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html (revision 5662)
+++ /CKEditor/trunk/CHANGES.html (revision 5663)
@@ -54,4 +54,5 @@
#5905 : SCAYT is not any more enabled by default.
#5736 : Improved the text generated for mailto: links if no text was selected.
+ #4779 : Adjust resize_minWidth and Height if smaller than actual dimensions.
Index: /CKEditor/trunk/_source/plugins/resize/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/resize/plugin.js (revision 5662)
+++ /CKEditor/trunk/_source/plugins/resize/plugin.js (revision 5663)
@@ -10,5 +10,11 @@
var config = editor.config;
- if ( config.resize_enabled )
+ !config.resize_dir && ( config.resize_dir = 'both' );
+ ( config.resize_maxWidth == undefined ) && ( config.resize_maxWidth = 3000 );
+ ( config.resize_maxHeight == undefined ) && ( config.resize_maxHeight = 3000 );
+ ( config.resize_minWidth == undefined ) && ( config.resize_minWidth = 750 );
+ ( config.resize_minHeight == undefined ) && ( config.resize_minHeight = 250 );
+
+ if ( config.resize_enabled !== false )
{
var container = null,
@@ -58,4 +64,7 @@
origin = { x : $event.screenX, y : $event.screenY };
+ config.resize_minWidth > startSize.width && ( config.resize_minWidth = startSize.width );
+ config.resize_minHeight > startSize.height && ( config.resize_minHeight = startSize.height );
+
CKEDITOR.document.on( 'mousemove', dragHandler );
CKEDITOR.document.on( 'mouseup', dragEndHandler );
@@ -92,4 +101,6 @@
/**
* The minimum editor width, in pixels, when resizing it with the resize handle.
+ * Note: It fallbacks to editor's actual width if that's smaller than the default value.
+ * @name CKEDITOR.config.resize_minWidth
* @type Number
* @default 750
@@ -97,8 +108,9 @@
* config.resize_minWidth = 500;
*/
-CKEDITOR.config.resize_minWidth = 750;
/**
* The minimum editor height, in pixels, when resizing it with the resize handle.
+ * Note: It fallbacks to editor's actual height if that's smaller than the default value.
+ * @name CKEDITOR.config.resize_minHeight
* @type Number
* @default 250
@@ -106,8 +118,8 @@
* config.resize_minHeight = 600;
*/
-CKEDITOR.config.resize_minHeight = 250;
/**
* The maximum editor width, in pixels, when resizing it with the resize handle.
+ * @name CKEDITOR.config.resize_maxWidth
* @type Number
* @default 3000
@@ -115,8 +127,8 @@
* config.resize_maxWidth = 750;
*/
-CKEDITOR.config.resize_maxWidth = 3000;
/**
* The maximum editor height, in pixels, when resizing it with the resize handle.
+ * @name CKEDITOR.config.resize_maxHeight
* @type Number
* @default 3000
@@ -124,8 +136,8 @@
* config.resize_maxHeight = 600;
*/
-CKEDITOR.config.resize_maxHeight = 3000;
/**
* Whether to enable the resizing feature. If disabled the resize handler will not be visible.
+ * @name CKEDITOR.config.resize_enabled
* @type Boolean
* @default true
@@ -133,9 +145,9 @@
* config.resize_enabled = false;
*/
-CKEDITOR.config.resize_enabled = true;
/**
* The directions to which the editor resizing is enabled. Possible values
* are "both", "vertical" and "horizontal".
+ * @name CKEDITOR.config.resize_dir
* @type String
* @default 'both'
@@ -144,3 +156,3 @@
* config.resize_dir = 'vertical';
*/
-CKEDITOR.config.resize_dir = 'both';
+