File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2653,7 +2653,7 @@ var CloudinaryUploader = class extends import_obsidian2.Plugin {
26532653 setupPasteHandler ( ) {
26542654 this . registerEvent ( this . app . workspace . on ( "editor-paste" , async ( evt , editor ) => {
26552655 const { files} = evt . clipboardData ;
2656- if ( files . length == 0 || ! files [ 0 ] . type . startsWith ( "image " ) ) {
2656+ if ( files . length == 0 && ! files [ 0 ] . type . startsWith ( "text " ) ) {
26572657 editor . replaceSelection ( "Clipboard data is not an image\n" ) ;
26582658 } else if ( this . settings . cloudName && this . settings . uploadPreset ) {
26592659 for ( let file of files ) {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export default class CloudinaryUploader extends Plugin {
3030 setupPasteHandler ( ) : void {
3131 this . registerEvent ( this . app . workspace . on ( 'editor-paste' , async ( evt : ClipboardEvent , editor : Editor ) => {
3232 const { files } = evt . clipboardData ;
33- if ( files . length == 0 || ! files [ 0 ] . type . startsWith ( "image " ) ) {
33+ if ( files . length == 0 && ! files [ 0 ] . type . startsWith ( "text " ) ) {
3434 editor . replaceSelection ( "Clipboard data is not an image\n" ) ;
3535 }
3636 else if ( this . settings . cloudName && this . settings . uploadPreset ) {
You can’t perform that action at this time.
0 commit comments