Skip to content
Permalink
Browse files

Merge branch 't/13603'

  • Loading branch information...
Reinmar committed Aug 10, 2015
2 parents d927e87 + a626481 commit e52e3b8c2d0e26bf4d0b8283482dab979bc24d4f
@@ -6,6 +6,7 @@ CKEditor 4 Changelog
New Features:

* [#13501](http://dev.ckeditor.com/ticket/13501): Added [`config.fileTools_defaultFileName`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fileTools_defaultFileName) option to allow setting default filename for paste uploads.
* [#13603](http://dev.ckeditor.com/ticket/13603): Added support for uploading dropped BMP images.

Fixed Issues:

@@ -36,7 +36,7 @@

// Handle images which are available in the dataTransfer.
fileTools.addUploadWidget( editor, 'uploadimage', {
supportedTypes: /image\/(jpeg|png|gif)/,
supportedTypes: /image\/(jpeg|png|gif|bmp)/,

uploadUrl: uploadUrl,

@@ -206,39 +206,63 @@
},

'test supportedTypes png': function() {
var editor = this.editors.classic;
var bot = this.editorBots.classic,
editor = this.editors.classic;

resumeAfter( editor, 'paste', function() {
assertUploadingWidgets( editor, LOADING_IMG );
} );
bot.setData( '', function() {
resumeAfter( editor, 'paste', function() {
assertUploadingWidgets( editor, LOADING_IMG );
} );

pasteFiles( editor, [ { name: 'test.png', type: 'image/png' } ] );
pasteFiles( editor, [ { name: 'test.png', type: 'image/png' } ] );

wait();
wait();
} );
},

'test supportedTypes jpg': function() {
var editor = this.editors.classic;
var bot = this.editorBots.classic,
editor = this.editors.classic;

resumeAfter( editor, 'paste', function() {
assertUploadingWidgets( editor, LOADING_IMG );
} );
bot.setData( '', function() {
resumeAfter( editor, 'paste', function() {
assertUploadingWidgets( editor, LOADING_IMG );
} );

pasteFiles( editor, [ { name: 'test.jpg', type: 'image/jpeg' } ] );
pasteFiles( editor, [ { name: 'test.jpg', type: 'image/jpeg' } ] );

wait();
wait();
} );
},

'test supportedTypes gif': function() {
var editor = this.editors.classic;
var bot = this.editorBots.classic,
editor = this.editors.classic;

resumeAfter( editor, 'paste', function() {
assertUploadingWidgets( editor, LOADING_IMG );
bot.setData( '', function() {
resumeAfter( editor, 'paste', function() {
assertUploadingWidgets( editor, LOADING_IMG );
} );

pasteFiles( editor, [ { name: 'test.gif', type: 'image/gif' } ] );

wait();
} );
},

pasteFiles( editor, [ { name: 'test.gif', type: 'image/gif' } ] );
'test supportedTypes bmp': function() {
var bot = this.editorBots.classic,
editor = this.editors.classic;

wait();
bot.setData( '', function() {
resumeAfter( editor, 'paste', function() {
assertUploadingWidgets( editor, LOADING_IMG );
} );

pasteFiles( editor, [ { name: 'test.bmp', type: 'image/bmp' } ] );

wait();
} );
},

'test not supportedTypes tiff': function() {
@@ -6,7 +6,7 @@
Test if photo uploading works properly:
* Dropped image should be replaced by a temporary `upload widget` and by the final image (`image` plugin) when upload is done.
* `jpg`, `png` and `gif` files should be supported.
* `jpg`, `png`, `gif` and `bmp` files should be supported.
* Undo and redo during and after upload should work fine.
* It should be possible to format text and copy image during upload.
* If image is removed during upload, the process should be aborted.
@@ -6,7 +6,7 @@
Test if photo uploading works properly:
* Dropped image should be replaced by a temporary `upload widget` and by the final image (`image2` plugin) when upload is dome.
* `jpg`, `png` and `gif` files should be supported.
* `jpg`, `png`, `gif` and `bmp` files should be supported.
* Undo and redo during and after upload should work fine.
* It should be possible to format text and copy image during upload.
* If image is removed during upload, the process should be aborted.

0 comments on commit e52e3b8

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