CLIP IT
A totally easy way for modern browsers to put something into clipboard.
Try it Out
Installation
$ npm i --save clip-it
Usage
HTML
Copy as TextCopy as HTML
JavaScript
const $btnCopyText = documentconst $btnCopyHTML = document $btnCopyText ) $btnCopyHTML )
ATTENTION
- The
clip-it
API must be triggered in the same callstack with a trusted event. - Some browsers only supports to copy plain text. (e.g. iOS Safari)