The workflow is simple:
- You click inside a textarea.
- The text is copied to the client's clipboard.
- Display notice to the user.
How do you do it?
The workflow is simple:
How do you do it?
This plugin is cross-compatible with all browsers and works well:
Copying to the clipboard is a tricky task to do in Javascript in terms of browser compatibility. The best way to do it is using a small flash. It will work on every browser. You can check it in this article.
Here's how to do it for Internet Explorer:
function copy (str)
{
//for IE ONLY!
window.clipboardData.setData('Text',str);
}
I was in need of something like this, and this one seems promising:
http://github.com/mojombo/clippy
Here's a simple jquery plugin for it as well: http://gist.github.com/66579