copy-to-clipboard
copy-to-clipboard copied to clipboard
Copy stuff into clipboard from your browser using JS
close #131
[https://github.com/sudodoki/copy-to-clipboard/blob/main/index.js#L69](https://github.com/sudodoki/copy-to-clipboard/blob/main/index.js#L69) If set `options.onCopy`, and NOT set `options.format`, copy will failed. ```javascript import copy from 'copy-to-clipboard' copy('text', { // do NOT set format onCopy: () => { // onCopy callback...
Here's how you would technically do that.
Copy to clipboard doesn't work when in fullscreen mode. Here's the reproduction: https://codesandbox.io/s/react-hooks-counter-demo-forked-ogi0uf?file=/src/index.js Steps to reproduce: 1. Click on "copy text" when it's not in full screen mode, the text...
I need to copy text which contains "\r\n". when using firefox, I found that the "\r\n" inside the copied text turned to be "\n\n". After reading the source code, I...
**Changelog** - Fixed `options.format` default value from `text/html` to `text/plain` in `README.md` file. ```js var clipboardToIE11Formatting = { "text/plain": "Text", "text/html": "Url", "default": "Text" } ``` As you can see,...
Version 3.3.2 of copy-to-clipboard [has](https://github.com/sudodoki/copy-to-clipboard/blob/193826f9859923d4e83c35093f3c436be00a162b/index.js#L14) the following code: ```js var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C"; ``` This emits a warning on Chrome: > Audit...

This feature (document.execCommand) is no longer recommended. Will it be implemented using navigator.clipboard API?