Open lightquake opened 10 years ago
Supposedly there's this HTML5 clipboard API, but from what I can gather, it isn't actually established yet? The best idea I have (without using Flash) is the suggestion in this page:
http://www.quora.com/HTML5/How-can-you-copy-to-clipboard-without-Flash
Anyone know more about this?
There's no need for Flash here. Initiating a copy is harder, but this only requires reacting to a copy and overriding it. There's an event for that which works just fine. See https://davidben.net/copy-test.html
(And there are APIs for determining what text in what nodes are part of the current selection.)
Well, I learned something today. With which selection should we trigger this? When all the text of a message is selected?
I think selecting just the text should only copy the text. Maybe do it only when all the nodes are selected, or all the nodes but the class (since that one can be kind of tricky to select).
I feel like even that is still difficult to do properly. Is it worth it to make a shortcut button that does this for you? Like next to the other bottom right icons?
This is what happens if you select an entire message and copy it:
Can we do anything to make this better? In particular, I think something like this would be good: