awesome-clipboard

2.0.4 • Public • Published

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

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i awesome-clipboard

    Weekly Downloads

    3

    Version

    2.0.4

    License

    MIT

    Unpacked Size

    5.5 kB

    Total Files

    4

    Last publish

    Collaborators

    • gaius
    • zyhack