Makes a DOM element (i.e. <button>) write to the system clipboard. This component is based off of the ZeroClipboard project, and in fact uses the same SWF Flash code.
$ component install component/clipboard-dom
<!-- The "copy-button" *should* be inside a div with "position: relative"or something else that "has layout". -->Copy to Clipboard
// main.jsvar Clip = ;// set the path to the swf file firstClip;// create a "Clip" instancevar ele = document;var parent = eleparentNode; // parent should "have layout"var clip = ele parent;// listen for meaningful eventsclip;clip;clip;
Fired when the SWF movie for the clipboard instance has loaded.
Fired when the user clicks on the button and the text has been copied. The text that got copied is passed in as an argument.
Fired when the user mouses over the button.
Fired when the user mouses away from the button.
Fired when the user pressed the mouse down on the button.
Fired when the user releases the mouse from the button.