X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fresize%2Fplugin.js;h=9f824b0086220dc2bb43177a5e32b2bd6e895139;hb=e73319a12b56100b29ef456fd74114fe5519e01c;hp=f520a8e4890a02ecde429e9f81129df923747ad0;hpb=48b1db88210b4160dce439c6e3e32e14af8c106b;p=ckeditor.git diff --git a/_source/plugins/resize/plugin.js b/_source/plugins/resize/plugin.js index f520a8e..9f824b0 100644 --- a/_source/plugins/resize/plugin.js +++ b/_source/plugins/resize/plugin.js @@ -9,6 +9,10 @@ CKEDITOR.plugins.add( 'resize', { var config = editor.config; + // Resize in the same direction of chrome, + // which is identical to dir of editor element. (#6614) + var resizeDir = editor.element.getDirection( 1 ); + !config.resize_dir && ( config.resize_dir = 'both' ); ( config.resize_maxWidth == undefined ) && ( config.resize_maxWidth = 3000 ); ( config.resize_maxHeight == undefined ) && ( config.resize_maxHeight = 3000 ); @@ -31,7 +35,7 @@ CKEDITOR.plugins.add( 'resize', dy = evt.data.$.screenY - origin.y, width = startSize.width, height = startSize.height, - internalWidth = width + dx * ( editor.lang.dir == 'rtl' ? -1 : 1 ), + internalWidth = width + dx * ( resizeDir == 'rtl' ? -1 : 1 ), internalHeight = height + dy; if ( resizeHorizontal ) @@ -88,10 +92,17 @@ CKEDITOR.plugins.add( 'resize', if ( !resizeHorizontal && resizeVertical ) direction = ' cke_resizer_vertical'; - event.data.html += '
'; + + // Always sticks the corner of botttom space. + resizeDir == 'ltr' && direction == 'ltr' ? + event.data.html += resizerHtml : + event.data.html = resizerHtml + event.data.html; } }, editor, null, 100 ); } @@ -99,8 +110,8 @@ CKEDITOR.plugins.add( 'resize', } ); /** - * 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. + * The minimum editor width, in pixels, when resizing the editor interface by using the resize handle. + * Note: It falls back to editor's actual width if it is smaller than the default value. * @name CKEDITOR.config.resize_minWidth * @type Number * @default 750 @@ -109,8 +120,8 @@ CKEDITOR.plugins.add( 'resize', */ /** - * 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. + * The minimum editor height, in pixels, when resizing the editor interface by using the resize handle. + * Note: It falls back to editor's actual height if it is smaller than the default value. * @name CKEDITOR.config.resize_minHeight * @type Number * @default 250 @@ -119,7 +130,7 @@ CKEDITOR.plugins.add( 'resize', */ /** - * The maximum editor width, in pixels, when resizing it with the resize handle. + * The maximum editor width, in pixels, when resizing the editor interface by using the resize handle. * @name CKEDITOR.config.resize_maxWidth * @type Number * @default 3000 @@ -128,7 +139,7 @@ CKEDITOR.plugins.add( 'resize', */ /** - * The maximum editor height, in pixels, when resizing it with the resize handle. + * The maximum editor height, in pixels, when resizing the editor interface by using the resize handle. * @name CKEDITOR.config.resize_maxHeight * @type Number * @default 3000 @@ -137,7 +148,7 @@ CKEDITOR.plugins.add( 'resize', */ /** - * Whether to enable the resizing feature. If disabled the resize handler will not be visible. + * Whether to enable the resizing feature. If this feature is disabled, the resize handle will not be visible. * @name CKEDITOR.config.resize_enabled * @type Boolean * @default true @@ -146,8 +157,8 @@ CKEDITOR.plugins.add( 'resize', */ /** - * The directions to which the editor resizing is enabled. Possible values - * are "both", "vertical" and "horizontal". + * The dimensions for which the editor resizing is enabled. Possible values + * are both, vertical, and horizontal. * @name CKEDITOR.config.resize_dir * @type String * @default 'both'