{"id":7870,"date":"2015-11-02T23:38:10","date_gmt":"2015-11-02T23:38:10","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/02\/html5-alternative-to-flash-based-zeroclipboard-for-safe-copying-of-data-to-clipboard-open-source-projects-zeroclipboard-zeroclipboard\/"},"modified":"2015-11-02T23:38:10","modified_gmt":"2015-11-02T23:38:10","slug":"html5-alternative-to-flash-based-zeroclipboard-for-safe-copying-of-data-to-clipboard-open-source-projects-zeroclipboard-zeroclipboard","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/02\/html5-alternative-to-flash-based-zeroclipboard-for-safe-copying-of-data-to-clipboard-open-source-projects-zeroclipboard-zeroclipboard\/","title":{"rendered":"HTML5 alternative to flash-based ZeroClipboard for safe copying of data to clipboard?-open source projects zeroclipboard\/zeroclipboard"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/221ee267a47948c755d681bb5b58f666?s=128&amp;d=identicon&amp;r=PG\" \/> <strong>Beau Bouchard<\/strong><\/p>\n<p>The reasoning is that automatic copying to clipboard can be very dangerous, thus most browsers (except IE)* make it difficult unless you use flash.<\/p>\n<p>Much like your ZeroClipboard, there is Clipboard LMCButton which also uses a small flash script running in the background.<\/p>\n<p>A common solution would be to do this:<\/p>\n<pre><code> function copyToClipboard (text) {\n     window.prompt (\"Copy to clipboard: Ctrl+C, Enter\", text);\n }\n<\/code><\/pre>\n<p>Which I found from Jarek Milewski when some one else asked the question here<\/p>\n<p>*Yes I found one solution for IE, however does not work in most modern browsers, check here.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Beau Bouchard The reasoning is that automatic copying to clipboard can be very dangerous, thus most browsers (except IE)* make it difficult unless you use flash. Much like your ZeroClipboard, there is Clipboard LMCButton which also uses a small flash script running in the background. A common solution would be to do this: function copyToClipboard [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7870","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7870","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=7870"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7870\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7870"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7870"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}