0.1.4 • Published 7 months ago

modern-copy-to-clipboard v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Modern Copy to Clipboard

Provide a simple way to copy text, html, png, or custom MIME-type data to clipboard.

Example

import copy from 'modern-copy-to-clipboard'

// Copy plain text
copy('Text')

// Copy html
copy({
  'text/plain': 'Hello World!',
  'text/html': '<p>Hello World!</p>'
})

// Copy custom MIME-type data
copy({
  'text/plain': 'Hello World!',
  'text/html': '<p>Hello World!</p>'
  'custom-data': '{"data":"Hello World!"}'
})

// Copy image
copy({
  'image/png': fetch(src).then(response => response.blob())
})
0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago