Open tpetricek opened 9 years ago
I have been looking around for a way to do this smoothly but it seems there is no "clean" way to do it.
Google Chrome has removed all APIs that grant access the clipboard and there is no standard API for the others browsers too.
There are two hacks that people are using to work around this.
Let me know what you think Tomas.
Yeah, the current version of www.fssnip.net uses the Flash trick, but I don't think that's a very good solution. I quite like the idea of just doing a pop up dialog (perhaps some nice Bootstrap way) with a textbox where people can copy it, so I'd go for that option!
Okay. I am on it.
I am almost done but I honestly don't like the way things came up at last.
Anyway I will create a pull request soon and you could see for your self.
This works in Chrome, but it seems to be broken in IE (on my machine at least).
Also, I'm not particularly keen on the blueish label in the dialog, so if we can make that white, that would be nicer (I think!)
I couldn't figure out how to make this work in IE, so I added exception handler...
Oh sorry I totally forgot about this in the mid of all the work I have, but yes I remember that accessing the clipboard in a uniform way across browsers is really hard. I miss F# and I hope to be able to participate again although I can't see it happening soon. Good luck
@tpetricek have a look at clipboard.js whenever you have time. It is having decent browser support.
... are not implemented! They should copy the thing into clipboard (if we can do that without ugly hacks - if no, we should remove the buttons)