All Projects → feross → Clipboard Copy

feross / Clipboard Copy

Licence: mit
Lightweight copy to clipboard for the web

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Clipboard Copy

Awesome Mad Science
Delightful npm packages that make you say "wow, didn't know that was possible!"
Stars: ✭ 909 (+105.19%)
Mutual labels:  browserify, browser
Render Media
Intelligently render media files in the browser
Stars: ✭ 181 (-59.14%)
Mutual labels:  browserify, browser
Connectivity
Detect if the network is up (do we have connectivity?)
Stars: ✭ 58 (-86.91%)
Mutual labels:  browserify, browser
Piknik
Copy/paste anything over the network.
Stars: ✭ 2,221 (+401.35%)
Mutual labels:  copy, clipboard
Gotem
Copy to clipboard for modern browsers in less than 1kb.
Stars: ✭ 439 (-0.9%)
Mutual labels:  copy, clipboard
Yt Player
Simple, robust, blazing-fast YouTube Player API
Stars: ✭ 576 (+30.02%)
Mutual labels:  browserify, browser
String To Stream
Convert a string into a stream (streams2)
Stars: ✭ 75 (-83.07%)
Mutual labels:  browserify, browser
Copy To Clipboard
✂️ Modern copy to clipboard. No Flash.
Stars: ✭ 39 (-91.2%)
Mutual labels:  copy, clipboard
v-copy
Vue directive to copy to clipboard. (1kB)
Stars: ✭ 88 (-80.14%)
Mutual labels:  clipboard, copy
MagicWE2
[MagicWE2] Lag free asynchronous world editor for PMMP with plenty of options
Stars: ✭ 109 (-75.4%)
Mutual labels:  clipboard, copy
Xcv
✂️ Cut, Copy and Paste files with Bash
Stars: ✭ 144 (-67.49%)
Mutual labels:  copy, clipboard
Simple Get
Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines
Stars: ✭ 357 (-19.41%)
Mutual labels:  browserify, browser
Vue Clipboard2
A simple vue2 binding to clipboard.js
Stars: ✭ 1,617 (+265.01%)
Mutual labels:  copy, clipboard
Lyo
📦 Node.js to browser - The easy way
Stars: ✭ 624 (+40.86%)
Mutual labels:  browserify, browser
Copy Paths To Clipboard
Copy paths in a variety of formats to the clipboard with Alfred
Stars: ✭ 83 (-81.26%)
Mutual labels:  copy, clipboard
Buffer
The buffer module from node.js, for the browser.
Stars: ✭ 1,178 (+165.91%)
Mutual labels:  browserify, browser
Clipboard Polyfill
📋 Simple copying on the web, with maximum browser compatibility.
Stars: ✭ 748 (+68.85%)
Mutual labels:  copy, clipboard
Magnet Uri
Parse a magnet URI and return an object of keys/values
Stars: ✭ 183 (-58.69%)
Mutual labels:  browserify, browser
netflix-list-exporter
💫‎‎‎‏‏‎ An Extension to export your lists from Netflix to Clipboard area and share it with your friends.
Stars: ✭ 60 (-86.46%)
Mutual labels:  clipboard, copy
Drag Drop
HTML5 drag & drop for humans
Stars: ✭ 443 (+0%)
Mutual labels:  browserify, browser

clipboard-copy travis npm downloads size javascript style guide

Lightweight copy to clipboard for the web

The goal of this package is to offer simple copy-to-clipboard functionality in modern web browsers using the fewest bytes. To do so, this package only supports modern browsers. No fallback using Adobe Flash, no hacks. Just 30 lines of code.

Unlike other implementations, text copied with clipboard-copy is clean and unstyled. Copied text will not inherit HTML/CSS styling like the page's background color.

Supported browsers: Chrome, Firefox, Edge, Safari.

Works in the browser with browserify!

install

npm install clipboard-copy

usage

const copy = require('clipboard-copy')

button.addEventListener('click', function () {
  copy('This is some cool text')
})

API

successPromise = copy(text)

Copy the given text to the user's clipboard. Returns successPromise, a promise that resolves if the copy was successful and rejects if the copy failed.

Note: in most browsers, copying to the clipboard is only allowed if copy() is triggered in direct response to a user gesture like a 'click' or a 'keypress'.

comparison to alternatives

testing

Testing this module is currently a manual process. Open test.html in your web browser and follow the short instructions. The web page will always load the latest version of the module, no bundling is necessary.

license

MIT. Copyright (c) Feross Aboukhadijeh.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].