WIP image upload via drag into ckeditor 4.5: DO not trigger et2_file uplaod if it is an type image and let CKEditor handles it

This commit is contained in:
Hadi Nategh 2015-08-07 15:22:20 +00:00
parent 9ede2c0b70
commit a2b96f0c9c

View File

@ -194,8 +194,11 @@ var et2_htmlarea = et2_inputWidget.extend([et2_IResizeable],
},200);
}
// Supported file types for dropping on CKEditor imageUpload plugin
var supportedTypesByCKEditor = /image\/(jpeg|png|gif)/;
// Try to pass the image into the first et2_file that will accept it
if(e.data.$.dataTransfer)
if(e.data.$.dataTransfer && !CKEDITOR.fileTools.isTypeSupported(e.data.$.dataTransfer.files[0],supportedTypesByCKEditor))
{
self.getRoot().iterateOver(function(widget) {
if(widget.options.drop_target)