This is a migrated thread and some comments may be shown as answers.

Copying to clipboard in Firefox

1 Answer 99 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 09 Jun 2008, 03:35 PM
Hi,

I'm aware of the security limitations in Firefox and accessing the Windows clipboard hence having to force the users to use CTRL+C and CTRL+V in the editor, but today I came across an implementation that I had not seen before even though the link and method is quite old going by the posted dates.

It seems to involve using a Flash SWF file to bypass the limitations with JavaScript and Firefox. I came across ir whilst browsing http://www.jtricks.com/ as they use it to copy to clipboard on their site. The following blog entry talks about this in a little more detail and its origins:

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

Is this something you are aware of and have chosen not to implement, or something that is new to you too?

I'm undecided on whether I like the implementation as it seems a little hacky, and to my knowledge doesn't help with pasting which seems a bit limiting and inconsistent

Anyway, just thought I'd share and see what you thought.

Rob

1 Answer, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 13 Jun 2008, 11:54 AM
Hello Rob,

Thank you for the provided information. Yes, we are aware of such solutions - that is, solutions using Flash to overcome various browser security limitations. In this particular case there are two reasons for not using the solution:

1. It requires a flash file, and we prefer to have everything inserted into the DLL if possible. This is the smaller issue of course.
2. It only works for "Copy", but not for "Paste". And it is exactly about controlling the "Paste" functionality that people are interested in - that is, what most developers need is a way to specify what formatting to be stripped when the user pastes content. It is not possible to do so with this approach, so there is little practical use of it.

Best regards,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Rob
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Share this question
or