Skip to content

Commit

Permalink
Use CKEDITOR.plugins.clipboard.dataTransfer#isFileTransfer().
Browse files Browse the repository at this point in the history
  • Loading branch information
Comandeer authored and sculpt0r committed Jan 25, 2022
1 parent 1934dfe commit 23b6f60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/imagebase/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,15 @@

setUp: function( editor, definition ) {
editor.on( 'paste', function( evt ) {
var method = evt.data.method,
dataTransfer = evt.data.dataTransfer,
var dataTransfer = evt.data.dataTransfer,
isFileTransfer = dataTransfer && dataTransfer.isFileTransfer(),
filesCount = dataTransfer && dataTransfer.getFilesCount();

if ( editor.readOnly ) {
return;
}

if ( method === 'drop' || ( method === 'paste' && filesCount ) ) {
if ( isFileTransfer ) {
var matchedFiles = [],
curFile;

Expand Down

0 comments on commit 23b6f60

Please sign in to comment.