diff --git a/CHANGES.md b/CHANGES.md index 28e017b1a8d..f6fd404e7bf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/plugins/image2/dialogs/image2.js b/plugins/image2/dialogs/image2.js index 94244569124..319be691a2d 100644 --- a/plugins/image2/dialogs/image2.js +++ b/plugins/image2/dialogs/image2.js @@ -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', diff --git a/plugins/wysiwygarea/plugin.js b/plugins/wysiwygarea/plugin.js index 35c8d9fedd0..eb8080420e0 100644 --- a/plugins/wysiwygarea/plugin.js +++ b/plugins/wysiwygarea/plugin.js @@ -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 @@ ''; } + // IE<10 needs this hack to properly enable . + // See: http://stackoverflow.com/a/13373180/1485219 (#11910). + if ( baseTag && CKEDITOR.env.ie && CKEDITOR.env.version < 10 ) { + bootstrapCode += + '' + } + data = data.replace( /(?=\s*<\/(:?head)>)/, bootstrapCode ); // Current DOM will be deconstructed by document.write, cleanup required.