Skip to content
Permalink
Browse files

Merge branch 't/11910'

  • Loading branch information...
oleq committed Jun 16, 2014
2 parents a2facd8 + 00ec25b commit 8eb72d131672870807387eb25ed1b4572aa23eb5
Showing with 19 additions and 2 deletions.
  1. +1 −0 CHANGES.md
  2. +6 −2 plugins/image2/dialogs/image2.js
  3. +12 −0 plugins/wysiwygarea/plugin.js
@@ -32,6 +32,7 @@ Fixed Issues:
* [#11947](http://dev.ckeditor.com/ticket/11947): [FF+IE11] Fixed: Shift+Enter in lists produces two line breaks.
* [#11972](http://dev.ckeditor.com/ticket/11972): Fixed: Feature detection in the [`element.setText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-setText) method should not trigger layout engine.
* [#7634](http://dev.ckeditor.com/ticket/7634): Fixed: Flash plugin omits `allowFullScreen` parameter in editor data if set `true`.
* [#11910](http://dev.ckeditor.com/ticket/11910): Fixed: [Enhanced Image](http://ckeditor.com/addon/image2) does not consider `config.baseHref` when updating image dimensions.

## CKEditor 4.4.1

@@ -38,6 +38,9 @@ CKEDITOR.dialog.add( 'image2', function( editor ) {

helpers = CKEDITOR.plugins.image2,

// Editor instance configuration.
config = editor.config,

// Content restrictions defined by the widget which
// impact on dialog structure and presence of fields.
features = editor.widgets.registered.image.features,
@@ -118,7 +121,8 @@ CKEDITOR.dialog.add( 'image2', function( editor ) {
callback( null );
} );

image.setAttribute( 'src', src + '?' + Math.random().toString( 16 ).substring( 2 ) );
image.setAttribute( 'src',
( config.baseHref || '' ) + src + '?' + Math.random().toString( 16 ).substring( 2 ) );
};
}

@@ -338,7 +342,7 @@ CKEDITOR.dialog.add( 'image2', function( editor ) {
heightField[ method ]();
}

var hasFileBrowser = !!( editor.config.filebrowserImageBrowseUrl || editor.config.filebrowserBrowseUrl ),
var hasFileBrowser = !!( config.filebrowserImageBrowseUrl || config.filebrowserBrowseUrl ),
srcBoxChildren = [
{
id: 'src',
@@ -136,6 +136,8 @@
script && script.parentNode.removeChild( script );
script = doc.getElementById( 'cke_shimscrpt' );
script && script.parentNode.removeChild( script );
script = doc.getElementById( 'cke_basetagscrpt' );
script && script.parentNode.removeChild( script );

if ( CKEDITOR.env.gecko ) {
// Force Gecko to change contentEditable from false to true on domReady
@@ -475,6 +477,16 @@
'</script>';
}

// IE<10 needs this hack to properly enable <base href="...">.
// See: http://stackoverflow.com/a/13373180/1485219 (#11910).
if ( baseTag && CKEDITOR.env.ie && CKEDITOR.env.version < 10 ) {
bootstrapCode +=
'<script id="cke_basetagscrpt">' +
'var baseTag = document.querySelector( "base" );' +
'baseTag.href = baseTag.href;' +
'</script>'
}

data = data.replace( /(?=\s*<\/(:?head)>)/, bootstrapCode );

// Current DOM will be deconstructed by document.write, cleanup required.

0 comments on commit 8eb72d1

Please sign in to comment.
You can’t perform that action at this time.