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