New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safari image pasting may be supported #21
Comments
hi, @virtman nice try, but the reported url ( e.g. webkit-fake-url://e05ae10e-96ae-42d0-a41a-ee03e7c35738/image.tiff ) is not the base64 encoded data, but a id referred to internal store of safari, which is not accessable by javascript. no way we can get the image out of this. |
Hello, PS: checked on Safari Mac OS X 10.11 (El Capitan) |
Hi, @virtman thanks for pointing out, but I tried your method and get an empty string (by |
Hi, @virtman , just a second after I posted those screenshots I found out that if you directly open the page from |
Hello, well, it seems, only when I copy image from Safari self (as image and not as text) and the source of this image is base64 data:png... (not just link) than it appears in clipboard as text that can be reused. |
It seems Safari developers dislike images from other sources, that is even more evident when trying get around webkit-fake-url. |
Yes, but |
Hello,
I have found out, that Safari supports pasted images.
The idea is, Safari reuses same way like you have for FireFox, but unlike FireFox you do not need to postpone image pasting. Pasted images are reported as plain base64 encoded pngs that can be read out + Safari reports the clipboardData.types "image/*****"
Here you can check the basic approach (paste image in Safari into ugly area, I did not make support of it in textarea)
https://fiddle.jshell.net/juwagn/gdar957u/embedded/result/
The text was updated successfully, but these errors were encountered: