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 42 forks source link

With the release of Quill 2.0, Parchment image blot gets triggered regardless of if your handler is set #53

Closed phillipwildhirt closed 1 month ago

phillipwildhirt commented 2 months ago

Pretty simple. Upgrade to Quill 2.0, drag over an image and even if your handler is set, Parchment Image Blot runs trying to create the dropped image.

It's pretty clear to me that minified distributed Quill 1.3.7 was actually using a different version of quill-delta. So the issue may lie there rather than once we get to the parchment script.

Quill 2.0.1 Quill-Delta 5.1.0 Angular 17.3.7 Ngx-Quill 25.3.2

phillipwildhirt commented 1 month ago

Appears as though quill 2.0.2 has fixed this with Bug Fix:

Ignore pasting images when image format is disallowed by @luin in https://github.com/slab/quill/pull/4202

linxianxi commented 1 month ago

How to resolve it? How to disable quill's default behavior?

phillipwildhirt commented 1 month ago

We pass a handler to it as per the docs

Finally If you didnot config a image handler, it will insert the image with dataURL into the quill editor directory after your drop/paste.