Turns out pasting images into composer is workable in IE11
https://github.com/layerssss/paste.js
We should get it working.
Turns out pasting images into composer is workable in IE11
https://github.com/layerssss/paste.js
We should get it working.
Would love to see a community PR in this area! I assume IE11 is now standardizing here…
@falco would you be interested in researching this?
It looks it’s the same story as Firefox, you can only paste on ContentEditable elements. So I have a plan to extend the Firefox Pasting behavior. Should have something tomorrow.
BTW, it already works on edge.
Even if it is Edge only that would be fine. What we have now is a whole lot of nothing. Bonus points for researching the current state of Safari in this regard as well.
Actually, it’s already working for me on Edge (Build 38.14393.0.0)
The hack would be to add IE 11 support only. Will see what is safari state now.
Oh I was not aware it worked on Edge already. Ie11 support is not a priority. Safari would be way more of our audience.
Edit: remember this topic is from 2014
Yes, but things aren’t looking good for Safari.
All the documentation I’ve found points to it being not possible atm…
⚓ T7916 Can't paste images from clipboard in Firefox / Safari and Safari image pasting may be supported · Issue #21 · layerssss/paste.js · GitHub
Looks like Safari behave like Firefox, but provides a local-only URL inaccessible by online js.
All right, then the only news is this already works on Edge with no changes on our end? That is fine.
And we can begin to ditch the Firefox hack when 50+ gets enough market share:
Did we ever revisit this @falco? Not for IE11 but for Firefox / Safari?
I copy/paste images regularly on Safari (I’ve set up screen grabbing to save the image in clipboard). Just tested on Firefox and it works there too.
Right but can we remove the “Firefox hack”? Or did we already do this when @joffreyjaffeux reworked the composer?
The hack is still there but looks like we can remove it. Pasting an image works on Firefox/Mac for me without the hack. Will do a quick test in a VM and commit if it’s good there too.
less code = more betterer
Firefox hack removed via https://github.com/discourse/discourse/commit/f400830575d800e7fb2fc206f0967773af120fa4
Also Firefox 50 was released November 2016. So we should be well clear of that.