chenjuneking / quill-image-drop-and-paste

A quill editor module for drop and paste image, with a callback hook before insert image into the editor
ISC License
101 stars 43 forks source link

Why drop Image HandleDrop isn't 'image' type? #54

Open wss534857356 opened 1 month ago

wss534857356 commented 1 month ago

https://github.com/chenjuneking/quill-image-drop-and-paste/blob/ade89cf623e6c479d49fbf9fe2acc7abce029d5b/src/ImageDropAndPaste.ts#L87

it should be 'image'

this.insert.call(this, utils.resolveDataUrl(dataUrl, type), 'image')
dalexander-trc commented 3 weeks ago

Without investigating too much, I'd wager it's a variable to ensure that any custom blots that might extend/overwrite image are preserved.

wss534857356 commented 3 weeks ago

Without investigating too much, I'd wager it's a variable to ensure that any custom blots that might extend/overwrite image are preserved.

sure, I agree you point. But in some case, image file may not include 'image' type