1.0.3 • Published 4 years ago

js-copy-clipboard v1.0.3

Weekly downloads
1
License
-
Repository
-
Last release
4 years ago

js-copy-clipboard v1.0.2 Build Status

The js-copy-clipboard library as Front-end code copy clipboard, Add custom content to the copied clipboard

Using npm:

$ npm i -g npm
$ npm i --save js-copy-clipboard

#Example

import copyClipboard from 'js-copy-clipboard';

copyClipboard([
  '作者:nanfeiyan',
  '链接:https://juejin.im/user/5b2db436f265da59961bd003/posts',
  '来源:juejin',
  '著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。',
]);

When you use Ctrl+C to copy your site, the pasted content will be followed by the content you need to attach, as shown below

Copied content...
作者:nanfeiyan
链接:https://juejin.im/user/5b2db436f265da59961bd003/posts
来源:juejin
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处.

Installation

Can be used as npm package and then leveraged using commonjs bundler/loader:

npm i --save copy-to-clipboard

Can be utilized using xxxx.com. Add following script to your page:

<script src='https://xxxx.com/lib/index.min.js' async></script>

You will have window.copyClipboard exposed for you to use.

See the package source for more details.

If you have any questions, please contact me 3328921305@qq.com

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago