Skip to content

Commit

Permalink
Fix showing notification for unsupported image types
Browse files Browse the repository at this point in the history
  • Loading branch information
KarolDawidziuk committed Mar 14, 2023
1 parent 3f70818 commit 62e37ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/clipboard/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@
}, null, null, 1 );

function testImageBase64Support( file ) {
// Check if turning images into base64 is disabled. #5431
if ( !editor.config.clipboard_handleImages ) {
return false;
}

var supportedImageTypes = [ 'image/png', 'image/jpeg', 'image/gif' ];
return CKEDITOR.tools.indexOf( supportedImageTypes, file.type ) !== -1;
}
Expand Down

0 comments on commit 62e37ac

Please sign in to comment.