wangzhengbo / copy-to-clipboard

Copy text to clipboard on the browser.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

copy-to-clipboard2

Copy text to clipboard on the browser.

Install

$ npm install copy-to-clipboard2 --save

Example

import copyToClipboard from 'copy-to-clipboard2';

copyToClipboard('Text').then(() => {
    console.log('Copyed successfully.')
}).catch(err => {
    console.error('Copyed failed', err)
})

About

Copy text to clipboard on the browser.

License:MIT License


Languages

Language:JavaScript 100.0%