Reputation: 173
I have a grid that will be containing many columns and data. Now user wants the copy to clipboard button that will allow user to copy data.
How can we achieve Copy to Clipboard functionality without using flash?
Thanks!
Upvotes: 1
Views: 3942
Reputation: 3586
There's a new API called document.execCommand() that lets you do copy and cut text to clipboard. It's already supported on most of the browsers, expect Safari.
If you want to learn more about it, I recommend reading Google's Cut and Copy Commands - HTML5 Rocks and Mozilla's Flash-Free Clipboard for the Web guides.
You also might want to check clipboard.js too. It's a super easy library to work with that.
Upvotes: 2