I want to have a button which selects the text in a textarea
and copies it to the clipboard. I can't seem to find any solutions which work in all browsers and don't use flash.
Surely this is doable? I've seen it all over the place but I guess they use flash, which I really want to stay away from if possible as some people don't have it.
This is what I have so far - it just selects the text:
function copyCode() {
$(#output-code).focus();
$(#output-code).select();
}
(The focus is not strictly necessary)