Skip to content

Commit 15d62f8

Browse files
committed
Merge branch 't/11225' into major
2 parents d56c392 + 248a96d commit 15d62f8

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ CKEditor 4 Changelog
33

44
## CKEditor 4.4
55

6+
New Features:
7+
8+
* [#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.
9+
610
## CKEditor 4.3.3
711

812
Fixed Issues:

core/tools.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,15 @@
11161116
if ( withAppend )
11171117
doc.appendChild( el );
11181118
}
1119-
}
1119+
},
1120+
1121+
/**
1122+
* The data URI of a transparent image. May be used e.g. in HTML as an image source or in CSS in `url()`.
1123+
*
1124+
* @since 4.3.1
1125+
* @readonly
1126+
*/
1127+
transparentImageData: 'data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw=='
11201128
};
11211129
} )();
11221130

plugins/fakeobjects/images/spacer.gif

-43 Bytes
Binary file not shown.

plugins/fakeobjects/plugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888

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

9393
if ( realElementType )
9494
attributes[ 'data-cke-real-element-type' ] = realElementType;
@@ -133,7 +133,7 @@
133133

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

138138
if ( realElementType )
139139
attributes[ 'data-cke-real-element-type' ] = realElementType;

plugins/widget/plugin.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2454,9 +2454,8 @@
24542454
// WIDGET helpers ---------------------------------------------------------
24552455
//
24562456

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

24612460
function cancel( evt ) {
24622461
evt.cancel();
@@ -2597,7 +2596,7 @@
25972596
img.setAttributes( {
25982597
'class': 'cke_reset cke_widget_drag_handler',
25992598
'data-cke-widget-drag-handler': '1',
2600-
src: transparentImageData,
2599+
src: CKEDITOR.tools.transparentImageData,
26012600
width: DRAG_HANDLER_SIZE,
26022601
title: editor.lang.widget.move,
26032602
height: DRAG_HANDLER_SIZE
@@ -2748,7 +2747,7 @@
27482747
if ( !img ) {
27492748
img = new CKEDITOR.dom.element( 'img', widget.editor.document );
27502749
img.setAttributes( {
2751-
src: transparentImageData,
2750+
src: CKEDITOR.tools.transparentImageData,
27522751
'class': 'cke_reset cke_widget_mask'
27532752
} );
27542753
widget.wrapper.append( img );

0 commit comments

Comments
 (0)