Open pmarcini opened 6 years ago
I can confirm this used to work in Chrome earlier this year, but seems to no longer work (possibly as of Chrome 66).
It seems now, clipboard permissions are blocked unless using localhost or a secure site. (See https://developers.google.com/web/updates/2018/03/clipboardapi for more information.)
However, pasting an image the first time on a page does not prompt for access to read the clipboard and no image shows. Nor does explicitly allowing clipboard access, which can be found here:
Click the info icon (localhost) or the lock icon (https host) in the address bar > Site settings > Clipboard > Allow
I noticed that this module uses the fallback synchronous method (https://github.com/kensnyder/quill-image-drop-module/blob/dabeb264ce20005f452166f028d02e6594cd9729/src/ImageDrop.js#L21), however it is not currently working in Chrome.
Hello,
It seems indeed not to work in Chrome for me too. I opened the dev tools and found that the paste is handled correctly by Chrome, but that there seems to be a bug in the library (maybe I'm just not using the version of Quill this library was written for):
The variable t
contains
{ index: 36, length: 0}
therefore the condition which allows to insert the image is never met.
@kensnyder would you accept a PR on this? I would:
Any progress on this? Thanks!
any progress? paste image, it's a important feature for me.
just remove the condition, it works
this is problem for me, it doesn't work in chrome. how to deal with it?
By removing condition it's partially working on Chrome. Working - Open an image and copy from that editor or in windows os do print screen, then paste is working fine Not working - Directly copy an image file from explorer and then paste, it is not working
I can't seem to get the demo to work in chrome: https://plnkr.co/edit/ubVmPkBjqQESsefM3JrT?p=preview However, it will work in FF, IE. Is there some sort of security setting needed to enable it to work in Chrome?
Thanks