Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 't/11225' into major
  • Loading branch information
Reinmar committed Feb 7, 2014
2 parents d56c392 + 248a96d commit 15d62f8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Expand Up @@ -3,6 +3,10 @@ CKEditor 4 Changelog

## CKEditor 4.4

New Features:

* [#11225](http://dev.ckeditor.com/ticket/11225): Introduced the [`CKEDITOR.tools.transparentImageData`](http://localhost/cksource/ckeditor-docs/build/#!/api/CKEDITOR.tools-property-transparentImageData) property which contains transparent image data to be used in CSS or as images' source.

## CKEditor 4.3.3

Fixed Issues:
Expand Down
10 changes: 9 additions & 1 deletion core/tools.js
Expand Up @@ -1116,7 +1116,15 @@
if ( withAppend )
doc.appendChild( el );
}
}
},

/**
* The data URI of a transparent image. May be used e.g. in HTML as an image source or in CSS in `url()`.
*
* @since 4.3.1
* @readonly
*/
transparentImageData: 'data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw=='
};
} )();

Expand Down
Binary file removed plugins/fakeobjects/images/spacer.gif
Binary file not shown.
4 changes: 2 additions & 2 deletions plugins/fakeobjects/plugin.js
Expand Up @@ -88,7 +88,7 @@

// Do not set "src" on high-contrast so the alt text is displayed. (#8945)
if ( !CKEDITOR.env.hc )
attributes.src = CKEDITOR.getUrl( plugin.path + 'images/spacer.gif' );
attributes.src = CKEDITOR.tools.transparentImageData;

if ( realElementType )
attributes[ 'data-cke-real-element-type' ] = realElementType;
Expand Down Expand Up @@ -133,7 +133,7 @@

// Do not set "src" on high-contrast so the alt text is displayed. (#8945)
if ( !CKEDITOR.env.hc )
attributes.src = CKEDITOR.getUrl( plugin.path + 'images/spacer.gif' );
attributes.src = CKEDITOR.tools.transparentImageData;

if ( realElementType )
attributes[ 'data-cke-real-element-type' ] = realElementType;
Expand Down
9 changes: 4 additions & 5 deletions plugins/widget/plugin.js
Expand Up @@ -2454,9 +2454,8 @@
// WIDGET helpers ---------------------------------------------------------
//

var transparentImageData = 'data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D',
// LEFT, RIGHT, UP, DOWN, DEL, BACKSPACE - unblock default fake sel handlers.
keystrokesNotBlockedByWidget = { 37: 1, 38: 1, 39: 1, 40: 1, 8: 1, 46: 1 };
// LEFT, RIGHT, UP, DOWN, DEL, BACKSPACE - unblock default fake sel handlers.
var keystrokesNotBlockedByWidget = { 37: 1, 38: 1, 39: 1, 40: 1, 8: 1, 46: 1 };

function cancel( evt ) {
evt.cancel();
Expand Down Expand Up @@ -2597,7 +2596,7 @@
img.setAttributes( {
'class': 'cke_reset cke_widget_drag_handler',
'data-cke-widget-drag-handler': '1',
src: transparentImageData,
src: CKEDITOR.tools.transparentImageData,
width: DRAG_HANDLER_SIZE,
title: editor.lang.widget.move,
height: DRAG_HANDLER_SIZE
Expand Down Expand Up @@ -2748,7 +2747,7 @@
if ( !img ) {
img = new CKEDITOR.dom.element( 'img', widget.editor.document );
img.setAttributes( {
src: transparentImageData,
src: CKEDITOR.tools.transparentImageData,
'class': 'cke_reset cke_widget_mask'
} );
widget.wrapper.append( img );
Expand Down

0 comments on commit 15d62f8

Please sign in to comment.