tags:

views:

48

answers:

2

Is there a script similar to the image below that lets the user press a copy button to copy text to their clipboards (instead of right-clicking to copy)?

alt text

Here's the URL where I got that image: http://github.com/rtomayko/rdiscount

Any ideas where I can find a script to do implement that functionality?

+2  A: 

GitHub uses Clippy.

Zero Clipboard is another solution as well.

brianng
Thank you so much! I tried Googling but didn't know what terms to use. Thank you so much :)
sjsc
+3  A: 
textField.addEventListener( MouseEvent.CLICK, clickHandler );

private function clickHandler( e : MouseEvent ) : void {
    System.setClipboard( e.target.text );
}
Antti
Thank you Antti!
sjsc