exec-copy
Copy text to clipboard using execCommand('copy')
on Web browser.
Usage
var execCopy = button
Fallback
Some browser (e.g. Safari) doesnot have execCommand('copy')
. For fallback, This library automatically open window.prompt
.
Also you can overwrite fallback if you need.
Sample
build sample code (./sample/source.js
)
% npm install
% npm run build
open ./sample/index.html