Tiny library for clipboard copy.
Install
tinycopy detects and supports CommonJS (node, browserify) and AMD (RequireJS). In the absence of those, it adds a object TinyCopy
to the global namespace.
Bower
Install node
and bower
if you haven't already.
Get tinycopy
:
$ cd /project
$ bower install tinycopy
Add this script to your index.html
:
<script type="text/javascript" src="bower_components/tinycopy/dist/tinycopy.js">
</script>
To pull in updates and bug fixes:
$ bower update tinycopy
Node / npm
$ npm install tinycopy
Usage
// copy from input elementvar tinycopy = element input;tinycopy;tinycopy;// copy from text1var tinycopy = element 'hello';tinycopy;tinycopy;// copy from text2element;
License
MIT License