October 29, 2006
Enabling Copy-Paste for Google Office in Firefox
Firefox has a feature that prevents rich-text editors from using copy, cut and paste. A malicious script could read the content from your clipboard and send it to a server. Your clipboard might contain sensitive information, so you don't want to let every site read the clipboard.
Unfortunately, these restrictions make sites like Google Docs & Spreadsheets harder to use, as you can't use options like: copy, cut, paste from the menus and you have to use browser's Edit menu or keyboard shortcuts.
If you want to enable these options for this site, you have to:
1. Open this file in Notepad:
For Windows 2000/XP:
C:\Documents and Settings\[username]\Application Data\Mozilla\Firefox\Profiles\[profile name]\user.js
replace [username] with your Windows username and [profilename] with the name of your active profile (most likely, the only profile)
For other operating systems: see here.
2. Append these lines:
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http://docs.google.com");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
You can add more sites in the second line, but they have to separated by spaces, like this:
user_pref("capability.policy.allowclipboard.sites", "http://docs.google.com http://www.zohowriter.com");
3. Save the file and restart Firefox to see the effect.
Subscribe to:
Post Comments (Atom)
Oh... I use Firefox 1.5.7 and Google's web apps work fine for me. The right-click context menu appears as it should, too!
ReplyDeleteI do remember it not working, however for a while, until I made a change in the Options for Firefox. I went to 'web features' then to 'javascript' then to 'advanced' then I 'allowed right-click menus' and it worked.
I didn't have to do anything complicated like you're suggesting.
Hey, I didn't talk about enabling the right-click menu from Google Docs. In case you didn't understand, the purpose of the post was to show you how to actually use the options copy/cut/paste from that contextual menu.
ReplyDeleteif you only wanna copy, cut and paste in docs with firefox, simplely use the keyboard short cut like ctrl+c, ctrl+x, ctrl+v. they'll work just fine.
ReplyDeletewhy do you have to use the right click menu???
sorry for my bad english, maybe i don't understand the post quite well.
Nice tip, Ionut! And thanks for including Zoho Writer :-)
ReplyDeleteI agree, 8O. I always those keyboard shortcuts, but there are many people that like to use the contextual menu, like in Microsoft Word, and they can't.
ReplyDeleteNot everyone uses a keyboard. Many people, like myself, use Tablet PCs or UMPCs, so we need the menus working.
ReplyDeleteFor those of you who cannot find your "user.js" file, you may have a "prefs.js" file that holds your user-preferences. I'm using FireFox 2.0.0.5 on a WinXP machine. I hope this helps.
ReplyDeleteTo throw in my two-cents, I go back and forth between keyboard short-cuts and right-click menus myself, depending on what I am doing. Since FireFox tells me that I have misspelled word, but Google Docs takes over my right-click menu, I cannot see the suggestions in that menu. I have to copy-paste the word into something that will suggest spellings. (I had no idea "temperament" had an "a" in it. :) )
This is a great tip. I normally use shortcut keys but they do not function correctly in Google Spreadsheets. They generally don't work at all, and the times they do it often messes up. But enabling Google to access the clipboard without a buffer fixed that problem.
ReplyDeleteFor me (Vista) the user.js file was not there so I created it and added the lines. Worked great.
ReplyDeleteNothing worse than right clicking something, realizing it doesn't work in FF and having to re-highlight it.
This tutorial was a great find thanks!
fantastic tip, thanks.
ReplyDeleteThis trick doesn't work in FF3.
ReplyDeleteAt Firefox version 3.03...
ReplyDeleteTools menu
Options
Content tab
Enable Javascript (presumed checked)
Advanced button on same line
Uncheck "Disable or replace context menus"
gmt
There is a solution for windows vista too?
ReplyDeletevery helpful, thank you very much! I was afraid there is a problem in my site. now I am relieved.
ReplyDeleteIt doesnt work with Windows XP and Firefox 3.5.1. I have installed the recommended extension for Firefox - AllowClipboardHelper + the advise of adding the lines to user.js. Now I can paste but not to cut/copy. Also after the mark of Disable or replace context menu have been changed to not marked, it appeared to have two menus one after other and the second (the script one is still not working).
ReplyDeleteSo this is not a solution. For further information I am using Wordpress with FSCKEditor. If I remove the editor (stop the plugin) all becomes to work flawlesly, but with it nope!
It works, but in version 3.6 impossible to paste formatted text (bold, italic...)
ReplyDeleteDo you have a solution for Chrome, i need it?
ReplyDeleteDo you have a solution for Chrome, i need it?
ReplyDeleteThis is December 2011 with FF 8.0 and this still works GREAT!
ReplyDeleteAnonymous said...
At Firefox version 3.03...
Tools menu
Options
Content tab
Enable Javascript (presumed checked)
Advanced button on same line
Uncheck "Disable or replace context menus"
gmt
Solution for Chrome is to install the Google Docs app. Is there a similar app for Firefox? Instead of digging around in config files?
ReplyDeleteWork Around, mentioned previously in this blog that works!
ReplyDeleteSelect all you want to copy, drag them into another source, I.E. A search toolbar. Then copy from there.