All Projects → zeroclipboard → Zeroclipboard

zeroclipboard / Zeroclipboard

Licence: mit
The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.

Programming Languages

javascript
184084 projects - #8 most used programming language
actionscript
884 projects
HTML
75241 projects

Projects that are alternatives of or similar to Zeroclipboard

flextreemap
TreeMap data visualization component for Adobe Flex
Stars: ✭ 22 (-99.67%)
Mutual labels:  flash, adobe-flash, apache-flex, adobe-flex
Angular Ru Interview Questions
Вопросы на собеседовании по Angular
Stars: ✭ 224 (-96.63%)
Mutual labels:  frontend, dom
Marko
A declarative, HTML-based language that makes building web apps fun
Stars: ✭ 10,796 (+62.35%)
Mutual labels:  frontend, dom
astra-flash
Fork of Astra Flash components
Stars: ✭ 15 (-99.77%)
Mutual labels:  flash, adobe-flash
Elementx
⚡️ Functionally create DOM elements and compose them to a tree quickly
Stars: ✭ 62 (-99.07%)
Mutual labels:  frontend, dom
Interview Problem Summary
🎤 Prepare for the interviews and sum up the most popular interview problems for front-end(HTML/CSS/Javascript), Web development, full-stack. Also did some typical coding practice questions, such as UI caculator
Stars: ✭ 112 (-98.32%)
Mutual labels:  frontend, dom
Online Privacy Test Resource List
Privacy Online Test and Resource Compendium (POTARC) 🕵🏻
Stars: ✭ 185 (-97.22%)
Mutual labels:  flash, dom
Nipplejs
🎮 A virtual joystick for touch capable interfaces.
Stars: ✭ 1,313 (-80.26%)
Mutual labels:  frontend, dom
Snuggsi
snuggsi ツ - Easy Custom Elements in ~1kB
Stars: ✭ 288 (-95.67%)
Mutual labels:  frontend, dom
Ply
CSS inspection aided by visual regression pruning
Stars: ✭ 370 (-94.44%)
Mutual labels:  frontend, dom
Crab
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Stars: ✭ 22 (-99.67%)
Mutual labels:  frontend, dom
Displayjs
A simple JavaScript framework for building ambitious UIs 😊
Stars: ✭ 590 (-91.13%)
Mutual labels:  frontend, dom
Mogwai
The minimalist, obvious, graphical, web application interface
Stars: ✭ 249 (-96.26%)
Mutual labels:  frontend, dom
starling-preloader
An example preloader for Starling Framework running in Adobe Flash Player in a web browser
Stars: ✭ 24 (-99.64%)
Mutual labels:  flash, adobe-flash
Imba
🐤 The friendly full-stack language
Stars: ✭ 5,434 (-18.29%)
Mutual labels:  frontend, dom
Nanohtml
🐉 HTML template strings for the Browser with support for Server Side Rendering in Node.
Stars: ✭ 651 (-90.21%)
Mutual labels:  frontend, dom
Goplayspace
Advanced Go Playground frontend written in Go, with syntax highlighting, turtle graphics mode, and more
Stars: ✭ 765 (-88.5%)
Mutual labels:  frontend
Computer Science
Contains the basic fundamental data structures and algorithms a front end engineer should know, written all in JavaScript.
Stars: ✭ 798 (-88%)
Mutual labels:  frontend
Etree
parse and generate XML easily in go
Stars: ✭ 763 (-88.53%)
Mutual labels:  dom
Front End Career
A career guide to Front End Developers
Stars: ✭ 765 (-88.5%)
Mutual labels:  frontend

⚠️ WARNING!

This library is no longer maintained as it is no longer necessary for modern web development. If you want your frontend JavaScript to manipulate the clipboard, please look into the new HTML Clipboard API (various docs available on MDN) or a small convenience wrapper around it like clipboard.js. Thanks for all your support, this project was a labor of love for many years. ❤️


Note:

This master branch contains the v2.x codebase for ZeroClipboard! For the v1.x codebase, see the 1.x-master branch instead.

ZeroClipboard

GitHub Latest Release Build Status GZip Size Coverage Status Dependency Status Dev Dependency Status

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.

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.

Setup

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

Development

Before submitting a pull request you'll need to validate, build, and test your code. Run the default grunt task in your terminal.

$ grunt

Testing

If you just want to run the tests, run grunt test.

$ grunt test

Limitations

User Interaction Required

Due to browser and Flash security restrictions, this clipboard injection can ONLY occur when the user clicks on the invisible Flash movie. A simulated click event from JavaScript will not suffice as this would enable clipboard poisoning.

Other Limitations

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.

Simple Example

<html>
  <body>
    <button id="copy-button" data-clipboard-text="Copy Me!" title="Click to copy me.">Copy to Clipboard</button>
    <script src="ZeroClipboard.js"></script>
    <script src="main.js"></script>
  </body>
</html>
// main.js
var client = new ZeroClipboard( document.getElementById("copy-button") );

client.on( "ready", function( readyEvent ) {
  // alert( "ZeroClipboard SWF is ready!" );

  client.on( "aftercopy", function( event ) {
    // `this` === `client`
    // `event.target` === the element that was clicked
    event.target.style.display = "none";
    alert("Copied text to clipboard: " + event.data["text/plain"] );
  } );
} );

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.

Here is a working test page where you can try out ZeroClipboard in your browser.

Testing ZeroClipboard Locally

To test the page demo page locally, clone the website repo.

Support

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.

ZeroClipboard 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 v2.0.2.

Releases

Starting with version 1.1.7, ZeroClipboard uses semantic versioning.

see releases

Related

License

MIT © James M. Greene Jon Rohan

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].