awesome-clipboard
v2.0.4
Published
simple clipboard for web app
Downloads
7
Readme
Awesome-clipboard
Please use es6-promise polyfill if not have native Promise implementation.
Usage
- click to copy
import Clipboard from 'awesome-clipboard'
const code = 'SOME_STRING'
document.getElementById('element').addEventListener('click', () => {
Clipboard.write(code).then(() => {
// 'SOME_STRING' is copied to your system clipboard
})
}, true)
Known issue
- UC browser is not supported, even if you want try clipboard.js