{"id":7873,"date":"2015-11-03T19:24:44","date_gmt":"2015-11-03T19:24:44","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/03\/zeroclipboard-zeroclipboard\/"},"modified":"2022-08-30T15:42:26","modified_gmt":"2022-08-30T15:42:26","slug":"zeroclipboard-zeroclipboard","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/03\/zeroclipboard-zeroclipboard\/","title":{"rendered":"zeroclipboard\/zeroclipboard"},"content":{"rendered":"<p><strong>This <code>master<\/code> branch contains the <code>v2.x<\/code> codebase for ZeroClipboard! For the <code>v1.x<\/code> codebase, see the <code>1.x-master<\/code> branch instead.<\/strong><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/badge.fury.io\/gh\/zeroclipboard%2Fzeroclipboard.png\" \/> <img decoding=\"async\" src=\"http:\/\/secure.travis-ci.org\/zeroclipboard\/zeroclipboard.png?branch=master\" \/> <img decoding=\"async\" src=\"http:\/\/coveralls.io\/repos\/zeroclipboard\/zeroclipboard\/badge.png?branch=master\" \/> <img decoding=\"async\" src=\"http:\/\/david-dm.org\/zeroclipboard\/zeroclipboard.png?theme=shields.io\" \/> <img decoding=\"async\" src=\"http:\/\/david-dm.org\/zeroclipboard\/zeroclipboard\/dev-status.png?theme=shields.io\" \/><\/p>\n<p>The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface. The \u201cZero\u201d signifies that the library is invisible and the user interface is left entirely up to you.<\/p>\n<p>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.<\/p>\n<h2>Limitations<\/h2>\n<h3>User Interaction Required<\/h3>\n<p>Due to browser and Flash security restrictions, this clipboard injection can <em><strong>ONLY<\/strong><\/em> occur when the user clicks on the invisible Flash movie. A simulated <code>click<\/code> event from JavaScript will not suffice as this would enable clipboard poisoning.<\/p>\n<h3>Other Limitations<\/h3>\n<p>For a complete list of limitations, see docs\/instructions.md#limitations.<\/p>\n<h2>Simple Example<\/h2>\n<pre><code>\n  \n    Copy to Clipboard\n    \n    \n  \n\n<\/code><\/pre>\n<pre><code>\/\/ main.js\nvar client = new ZeroClipboard( document.getElementById(\"copy-button\") );\n\nclient.on( \"ready\", function( readyEvent ) {\n  \/\/ alert( \"ZeroClipboard SWF is ready!\" );\n\n  client.on( \"aftercopy\", function( event ) {\n    \/\/ `this` === `client`\n    \/\/ `event.target` === the element that was clicked\n    event.target.style.display = \"none\";\n    alert(\"Copied text to clipboard: \" + event.data[\"text\/plain\"] );\n  } );\n} );\n<\/code><\/pre>\n<p>See docs\/instructions.md for more advanced options in using the library on your site. See docs\/api\/ZeroClipboard.md for the complete API documentation.<\/p>\n<p>Here is a working test page where you can try out ZeroClipboard in your browser.<\/p>\n<h2>Testing ZeroClipboard Locally<\/h2>\n<p>To test the page demo page locally, clone the website repo.<\/p>\n<h2>Support<\/h2>\n<p>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 <em>little<\/em> extra effort.<\/p>\n<p>ZeroClipboard <code>v2.x<\/code> is expected to work in IE9+ and all of the evergreen browsers. Although support for IE7 &amp; IE8 was officially dropped in <code>v2.0.0<\/code>, it was actually still <em>technically<\/em> supported through <code>v2.0.2<\/code>.<\/p>\n<h2>Contributing<\/h2>\n<p>see CONTRIBUTING.md<\/p>\n<h2>Releases<\/h2>\n<p>Starting with version 1.1.7, ZeroClipboard uses semantic versioning.<\/p>\n<p>see releases<\/p>\n<h2>Roadmap<\/h2>\n<p>see roadmap.md<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This master branch contains the v2.x codebase for ZeroClipboard! For the v1.x codebase, see the 1.x-master branch instead. The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface. The \u201cZero\u201d signifies that the library is invisible and the user interface is left [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,1],"tags":[],"class_list":["post-7873","post","type-post","status-publish","format-standard","hentry","category-semantic","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7873"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7873\/revisions"}],"predecessor-version":[{"id":8764,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7873\/revisions\/8764"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}