Flash-Free Clipboard for the Web

Posted . Visible to the public.

Unfortunately, Web APIs haven’t provided the functionality to copy text to the clipboard through JavaScript, which is why visiting GitHub with Flash disabled shows an ugly grey box where the button is supposed to be. Fortunately, we have a solution. The editor APIs provide document.execCommand as an entry point for executing editor commands. The "copy" and cut" commands have previously been disabled for web pages, but with Firefox 41, which is currently in Beta, and slated to move to release in mid-September, it is becoming available to JavaScript within user-action initiated callbacks.

Henning Koch
Last edit
Henning Koch
Keywords
copy, paste
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2015-09-01 17:54)