All Projects → callmecavs → Gotem

callmecavs / Gotem

Copy to clipboard for modern browsers in less than 1kb.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Gotem

Copy Paths To Clipboard
Copy paths in a variety of formats to the clipboard with Alfred
Stars: ✭ 83 (-81.09%)
Mutual labels:  copy, clipboard
Copy To Clipboard
✂️ Modern copy to clipboard. No Flash.
Stars: ✭ 39 (-91.12%)
Mutual labels:  copy, clipboard
Clipboard Copy
Lightweight copy to clipboard for the web
Stars: ✭ 443 (+0.91%)
Mutual labels:  copy, clipboard
v-copy
Vue directive to copy to clipboard. (1kB)
Stars: ✭ 88 (-79.95%)
Mutual labels:  clipboard, copy
Piknik
Copy/paste anything over the network.
Stars: ✭ 2,221 (+405.92%)
Mutual labels:  copy, clipboard
Vue Clipboard2
A simple vue2 binding to clipboard.js
Stars: ✭ 1,617 (+268.34%)
Mutual labels:  copy, clipboard
Clipboard Polyfill
📋 Simple copying on the web, with maximum browser compatibility.
Stars: ✭ 748 (+70.39%)
Mutual labels:  copy, clipboard
Xcv
✂️ Cut, Copy and Paste files with Bash
Stars: ✭ 144 (-67.2%)
Mutual labels:  copy, clipboard
MagicWE2
[MagicWE2] Lag free asynchronous world editor for PMMP with plenty of options
Stars: ✭ 109 (-75.17%)
Mutual labels:  clipboard, copy
netflix-list-exporter
💫‎‎‎‏‏‎ An Extension to export your lists from Netflix to Clipboard area and share it with your friends.
Stars: ✭ 60 (-86.33%)
Mutual labels:  clipboard, copy
fs-utils
Generalized file and path utils for Node.js projects.
Stars: ✭ 33 (-92.48%)
Mutual labels:  copy
vimclip
Never type outside vim again
Stars: ✭ 70 (-84.05%)
Mutual labels:  clipboard
React Clipboard.js
React wrapper for clipboard.js (flashless clipboard)
Stars: ✭ 266 (-39.41%)
Mutual labels:  clipboard
Extrakto
tmux - quickly select, copy/insert/complete text without a mouse
Stars: ✭ 320 (-27.11%)
Mutual labels:  clipboard
ClipboardText
Universal clipboard text support for PowerShell, notably also in PowerShell Core (cross-platform) and Windows PowerShell v2-v4
Stars: ✭ 37 (-91.57%)
Mutual labels:  clipboard
Copy
Go copy directory recursively
Stars: ✭ 264 (-39.86%)
Mutual labels:  copy
Desktop
A comprehensive solution for convenient and efficient work with notes, snippets, clipboard, files, and other information that requires quick access via any device.
Stars: ✭ 123 (-71.98%)
Mutual labels:  clipboard
clipboard-files
A nodejs addon, read or write file path for clipboard, support win32 and mac osx.
Stars: ✭ 26 (-94.08%)
Mutual labels:  clipboard
postcss-copy
An async postcss plugin to copy all assets referenced in CSS files to a custom destination folder and updating the URLs.
Stars: ✭ 39 (-91.12%)
Mutual labels:  copy
Clip
Cross-platform C++ library to copy/paste clipboard content
Stars: ✭ 341 (-22.32%)
Mutual labels:  clipboard

gotem

gotem on NPM Standard JavaScript Style

Copy to clipboard for modern browsers in less than 1kb.

Install

$ npm i gotem --save

Use

gotem is a function that accepts 3 parameters:

  1. A required trigger node.
  2. A required target node.
  3. An optional object of callback functions.

Examples follow:

import gotem from 'gotem'

// a trigger and target node are required
const nodes = {
  trigger: document.getElementById('trigger'),
  target: document.getElementById('target')
}

// when the trigger is clicked,
// the text of the target will be copied to the clipboard
gotem(nodes.trigger, nodes.target)

// if an object with callback functions (success, error) is passed,
// the appropriate function, based on the result of executing the copy command, will be fired if it exists
gotem(nodes.trigger, nodes.target, {
  success: () => console.log('Copy command succeeded'),
  error: () => console.log('Copy command failed, BUT the text to copy has still been selected.')
})

Browser Support

gotem requires execCommand cut/copy support.

As such, it works in the following:

  • Chrome 43+
  • Firefox 41+
  • Safari 10+
  • Edge 12+
  • IE 9+

License

MIT. © 2017 Michael Cavalea

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].