Javascript – Are there any new solutions for copying multiple groups of text to clipboard via JavaScript / Flash, since Flash 10

copycopy/pasteflashjavascriptjquery

Since Flash 10 was introduced, many of the popular 'copy to clipboard' scripts out there have stopped working due to new security restrictions. There is a Flash-only solution here:

http://cfruss.blogspot.com/2009/01/copy-to-clipboard-swf-button-cross.html

…though I'm looking for the ability to trigger the copy function via JS, rather than relying on the user to click on a Flash object to trigger.

For an example of what we currently employ, see:

http://snipt.net/public

Any of the 'copy' links use jQuery's copy plugin here:

http://plugins.jquery.com/project/copy

UPDATE: OK, so I tried ZeroClipboard. At first glance, it looked great. However, the amount of redundant code needed to enable multiple clipboard bindings is unacceptable. In some cases, there will be 40+ instances of text that each have their own 'copy' link. Still looking for a better solution…

Best Answer

That's terrible news, I hadn't even noticed. I use the Flash trick extensively too. As far as I know that was the only way to get copy to work without having to install some other plugin (besides the ubiquitous Flash) due to browser security concerns.

Update: After much panic, and a few google searches, I stumbled on http://code.google.com/p/zeroclipboard/ which provides a Flash 10 compatible trick to get the copy to work once again. Now to go around updating websites...

Related Topic