X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fresize%2Fplugin.js;h=24ba09ca7361d41b650616d700ea89d78eda595b;hp=f520a8e4890a02ecde429e9f81129df923747ad0;hb=4e90e78dc97789709ee7404359a5517540c27553;hpb=8f6c203fdaa543c3bca40baea6ae4ddcdf1a77f5 diff --git a/_source/plugins/resize/plugin.js b/_source/plugins/resize/plugin.js index f520a8e..24ba09c 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 ); }