Get clipboard data

pohan picture pohan · Jul 17, 2009 · Viewed 13.9k times · Source

I'm trying to write a Javascript function to edit content from clipboard before pasting. Right now i got bound event 'paste' to function via JQuery.

$(this.elementDoc).bind('paste', function(event){
   self.OnPaste(event);
});

But that's not important. Now I would like to get Data from clipboard, but I can't find out how. I would be glad for every hint.

Answer

Calvin picture Calvin · Jul 17, 2009

This is a toughie. If I recall correctly, IE allows access to the clipboard, but by default Firefox does not due to security issues. I had to do this for a project I was working on, and was forced to use a small SWF file that did the copying.

http://www.jeffothy.com/weblog/clipboard-copy/