Wallogit.com
2017 © Pedro Peláez
Deprecated - Please check official version now avaliable (https://packagist.org/packages/zeroclipboard/zeroclipboard)
The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie, and a JavaScript interface. The "Zero" signifies that the library is invisible and the user interface is left entirely up to you., (*1)
``` html , (*2)
``` js // main.js var clip = new ZeroClipboard( document.getElementById("copy-button"), { moviePath: "/path/to/ZeroClipboard.swf" } ); clip.on( 'load', function(client) { // alert( "movie is loaded" ); } ); clip.on( 'complete', function(client, args) { this.style.display = 'none'; // "this" is the element that was clicked alert("Copied text to clipboard: " + args.text ); } ); clip.on( 'mouseover', function(client) { // alert("mouse over"); } ); clip.on( 'mouseout', function(client) { // alert("mouse out"); } ); clip.on( 'mousedown', function(client) { // alert("mouse down"); } ); clip.on( 'mouseup', function(client) { // alert("mouse up"); } );
See the instructions for advanced instructions on how to use the library on your site., (*3)
Here is a working test page where you can try out ZeroClipboard in your browser., (*4)
To test the page demo page locally. checkout the gh-pages branch and run make. This should open localhost:3000, (*5)
git co gh-pages make
add BRANCH=my-dev-branch to get the assets from a certain branch, (*6)
git co gh-pages make BRANCH=my-dev-branch
This library is fully compatible with Flash Player 10, which requires that the clipboard copy operation be initiated by a user click event inside the Flash movie. This is achieved by automatically floating the invisible movie on top of a DOM element of your choice. Standard mouse events are even propagated out to your DOM element, so you can still have rollover and mouse down effects., (*7)
Works in IE8+. Works in IE7 but requires Sizzle/jQuery. (And of course works in all of the other browsers.), (*8)
see CONTRIBUTING.md, (*9)
After version 1.1.7 ZeroClipboard uses semantic versioning, (*10)
see releases.md, (*11)
see roadmap.md, (*12)