I’d like to have a ‘COPY’ button that uses Javascript to copy the contents of a TEXTAREA onto the clipboard, but the only solution I’ve managed to find is one that uses Flash, which I don’t want to do (JQuery Clipboard).
The user will be copying some code from inside the textarea on my website to a HTML editor (via the clipboard) so I also can’t use any elegant hidden DIVs, as they won’t be accessible to the editor.
Does anyone know if it’s possible?
[EDIT: I’ve looked at this solution and it uses Flash which I don’t want].
For security reasons, it’s not possible to access user’s clipboard directly. The Flash solution is a workaround.
Another possibility can be seen here.
It basically prompts the user to copy the text manually.