quill-image-drop-and-paste
quill-image-drop-and-paste copied to clipboard
Duplicate image on paste
I have defined a custom image handler and that does trigger a modal to upload an image and that does work.
I also replaced it with a function that only does alert("Works!");
just to be sure it's not the cause of my issue.
However immediately upon pasting the image inside the editor, I immediately get an inserted image as a string blob inserted into the editor. This way after continuing with my upload modal, I end up having two images. Once the inline string blob and once an image tag with my uploaded image as src.
PS: There is a typo in the docs: "didnot" => "did not". ;)
If you didnot config a image handler, it will insert the image with dataURL into the quill editor directory after your drop/paste.
Any help on how to prevent the default behaviour is highly appreciated. 🙏
Sorry for your trouble, could you provide some codes or screen videos showing the issue?
Sorry for your trouble, could you provide some codes or screen videos showing the issue?
Sure, thanks for asking: https://youtu.be/245KPVeXZ3g
same
Also experiencing this.
"ngx-quill": "~25.3.0",
"parchment": "~3.0.0",
"quill": "~2.0.2",
"quill-image-drop-and-paste": "~1.3.0"
same
Hi all, it looks like Quill >2.0.0
might have added native image upload functionality which conflicts with this module, hence duplicate uploads. If you want to fix the duplicate issue easily, just add uploader: { handler: () => {} },
to your modules
list in Quill, or do something like this:
class NoopClass {}
Quill.register({
"modules/uploader": NoopClass
}, true);
I don't know if the native version is better or worse, just that this fixes it. Cheers.
fixed on version ^2.0.0
.