0.2.0 • Published 2 years ago
copy-text-or-rich-text-to-clipboard-async v0.2.0
copy-async
复制文本、富文本到剪切板,WebSite
usage
npm i copy-text-or-rich-text-to-clipboard-async
import copy from 'copy-text-or-rich-text-to-clipboard-async';
await copy('hello world');
await copy('<h1>hello world</h1>');
await copy(document.querySelector('#rich-text'));
await copy(document.querySelector('#rich-text'), { html: true });