News for hackers. Stuff that matters.
Re:0to255 by RyanMcGreal on Monday April 12, 2010 @11:26AM (#1259330)
I'm not going to pretend that HTML5+Javascript can easily replication Flash functionality, but I'm pretty sure it can handle copy-to-clipboard.

Edit forehead slap. The last time I had to write a script to copy to clipboard was several years ago and I was targeting the script for IE on a company intranet. I stand humbly (and foolishly) corrected.

Re:0to255 by piranha on Monday April 12, 2010 @11:46AM (#1259398)
It can't as long as I know. :(
Re:0to255 by kylebragger on Monday April 12, 2010 @11:36AM (#1259367)
Hm, that would be great — I'd love to see an example of this.
Re:0to255 by warfangle on Monday April 12, 2010 @11:47AM (#1259405)
Typically you'll get a selection object, get the range object, and .execCommand("Copy") on it. Unfortunately it only really works in IE (afaik); it used to work in FF if you got the Allow Clipboard Access plugin, but even that's been disabled.

It could potentially be a huge security risk, which is why it's had to be sandboxed into plugins like flash.

Re:0to255 by zmmmmm on Monday April 12, 2010 @12:43PM (#1259622)
>It could potentially be a huge security risk,

Why is copying data into the clipboard a security risk?

> which is why it's had to be sandboxed into plugins like flash.

But it's already in a sandbox (the browser). Why do we need a sandbox inside the sandbox?

I really don't understand what the huge deal is with this. It's almost harder to get some plain text onto the clipboard than it is to get the user to run a .exe.