master branch contains the
v2.x codebase for ZeroClipboard! For the
v1.x codebase, see the
1.x-master branch instead.
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 mousedown effects.
Suggestions welcome read over the contributing guidelines.
To setup the project for local development start with these commands in your terminal.
$ git clone https://github.com/zeroclipboard/zeroclipboard.git$ cd zeroclipboard/$ npm install -g grunt-cli$ npm install$ grunt
Before submitting a pull request you'll need to validate, build, and test your code. Run the default grunt task in your terminal.
If you just want to run the tests, run grunt test.
$ grunt test
Due to browser and Flash security restrictions, this clipboard injection can ONLY occur when
the user clicks on the invisible Flash movie. A simulated
suffice as this would enable clipboard poisoning.
For a complete list of limitations, see docs/instructions.md#limitations.
On that page, you will also find an explanation of why ZeroClipboard will NOT work by default on code playground sites like JSFiddle, JSBin, and CodePen, as well as the appropriate "View" URLs to use on those sites in order to allow ZeroClipboard to work.
Copy to Clipboard
// main.jsvar client = document ;client;
Here is a working test page where you can try out ZeroClipboard in your browser.
This library is fully compatible with Flash Player 11.0.0 and above, 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 mousedown effects with just a little extra effort.
v2.x is expected to work in IE9+ and all of the evergreen browsers.
Although support for IE7 & IE8 was officially dropped in
v2.0.0, it was actually
still technically supported through