How to paste text using Firefox?

How to paste text using Firefox?

by N Hansen -
Number of replies: 34
When I have tried to paste into the html editor, I get a message saying I can't do so and a link to this page. The problem is that the instructions on this page how to enable it resemble nothing I see on my computer. Neither the path specified nor the file exist on my computer. I don't even know where to begin to remedy this situation as these instructions are useless. Any tips?
Average of ratings: -
In reply to N Hansen

Re: How to paste text using Firefox?

by Janne Mikkonen -
Have you used Phoenix before FireFox?

The user.js file just not might be at the location where you'd been looking for it.

Take a look at:
C:\Documents and Settings\<your windows login>\Application data\<Mozilla or Firefox or Pheonix>\Profiles\Default\<folder with random numbers and chars>\

For clarity here is mine path where my user.js file reside

C:\Documents and Settings\<my loginname>\Application data\Phoenix\Profiles\Default\6xxmn86.slt\

You can also use search tool to locate the user.js file. And when you find it you'll have to add all the sites you wish to enable cut 'n' paste in it:

user_prefs("capability.policy.allowclipboard.sites","http://www.firstsite.com http://secondsite.net http://moodle.thirdsite.org");

As you can see if you add multiple sites, the site names must be separated with space.

I hope this helps.

- Janne -
In reply to Janne Mikkonen

Re: How to paste text using Firefox?

by Ray Lawrence -
Works fine fom menu with Edit -> Paste, but not with shortcut keys.
In reply to Ray Lawrence

Re: How to paste text using Firefox?

by N Hansen -
This is a new harddrive, and has had nothing but Firefox on it. I've searched for the file, it simply doesn't exist on my computer, anywhere. But at least Ray's trick worked...
In reply to N Hansen

Re: How to paste text using Firefox?

by Samuli Karevaara -
Hi, the first catch is that the file doesn't exist at all after the installation, it has to be created. It would be nice for the Mozilla team to put a dummy file so people would locate it easier, or at least mention that it has to be created from scratch.

Another catch is that in Windows XP the folder is something like
C:\Documents and Settings\Samuli\Application Data\Mozilla\Firefox\Profiles\default.rwe

The last part (.rwe) is quite random.

Final catch is to have the URL correctly in the file. At first glance I didn't notice the URL specification at all in the instructions on the page you mentioned, just noticed "allAccess" and thought that it's enough.
In reply to Samuli Karevaara

Re: How to paste text using Firefox?

by N Hansen -
It's hopeless. I kind of suspected I might have to create the file but since none of the paths suggested even exist on my computer I wouldn't have a clue where to put it even if I created it.
In reply to N Hansen

Re: How to paste text using Firefox?

by Samuli Karevaara -
Try searching for "prefs.js". It should exist on your computer and in the same folder that the user.js should go to. In my case the folder also has "bookmarks.html" and "mimeTypes.rdf", for example.

Also check that the search goes through the system files also, these might be "hidden" in the Windows XP settings, not sure...
In reply to N Hansen

Re: How to paste text using Firefox?

by Lars Jensen -
Hi n,

If you're on XP or 2000, you need to open the Window's explorer, click the Tools menu, open Folder options, click the "View" tab, and select "Show hidden files and folders". Next, go into C:\Documents and Settings\username\Application Data\Mozilla\Firefox\Profiles\0dfu89z3.default\prefs.js and edit in the lines below. Make sure Firefox is not running while you edit. After this you can cut-paste
from the Firefox "Edit" menu.

user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
user_pref("capability.policy.allowclipboard.sites", " http://www.mozilla.org add_more_hosts_here");
user_pref("capability.policy.policynames", "allowclipboard");

Lars
In reply to N Hansen

Re: How to paste text using Firefox?

by W Page -

Hi N!

Suggest you do the following,

  1. Add the extension ChromeEdit to your FireFox browser at , http://cdn.mozdev.org/chromedit/
  2. After it is installed close and then open the browser.
  3. Go to Tools >> Edit User Files (You will see the ChromeEdit Icon next to it).  See attached image.
  4. When the ChromeEdit window opens do the following,
      1. Look for the tab named "User.js" and click on it.
      2. Paste the code into the window which opens from the page you noted above,
        http://www.mozilla.org/editor/midasdemo/securityprefs.html
      3. Then look for the line,
        user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org")
      4. Add http:/www.moodle.org to that line the following way.
         user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org http://www.moodle.org");
      5. As Janne pointed out there is a space between web sites.  Also you will see each web site is not surrounded by double quotes.  The first and the last web sites are surrounded by double quotes.
      6. After you have added Moodle, click on the save button in the left lower corner.
  5. Close and then open the FireFox browser.
  6. You should now be able to paste to Moodle. പുഞ്ചിരി വിക്രുതഹാസം

Hope this helps!

WP1

Attachment chrome_edit_01.gif
In reply to W Page

Re: How to paste text using Firefox?

by N Hansen -
Tried your suggestion WP1, but it didn't solve the problem. Not sure why though...
In reply to N Hansen

Re: How to paste text using Firefox?

by Samuli Karevaara -
I couldn't get ChromEdit to work with Firefox 1.0PR.
In reply to Samuli Karevaara

Re: How to paste text using Firefox?

by N Hansen -
I was able to get it working with Firefox 1.0PR, and create the proper file, but it just didn't have the proper effect it was supposed to have-i.e. I still can't paste.
In reply to N Hansen

Re: How to paste text using Firefox?

by Josep M. Fontana -
Perhaps we should go back to previous versions of Firefox sad. I don't notice much difference between the newest version and the previous one (both of them are excellent browsers, except for these little glitches in the last version). The problem is, I don't know where to get a copy of the previous version.

Josep M.
In reply to Josep M. Fontana

Re: How to paste text using Firefox?

by N Hansen -
I've still got a copy of 0.93 on my computer, but it's probably too big to send to you. In any case, I never had the cut and paste enabled before anyway and I've gotten used to the really nice CTRL-F function in PR so I don't want to downgrade. It is annoying though that you get used to these cool extensions and then they don't work anymore. My favorite was one called Linky, which hasn't been updated in a while and therefore doesn't work anymore.
In reply to W Page

Re: How to paste text using Firefox?

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Just a note - ChromEdit won't work with the newest release of FireFox (PR1). They haven't updated it yet.

mike
In reply to Mike Churchward

Re: How to paste text using Firefox?

by N Hansen -
When you say it doesn't work, what do you mean? I was able to install it on PR1 yesterday, and edit the file in question with it without any difficulties. The problem is I still can't paste.
In reply to N Hansen

Re: How to paste text using Firefox?

by Jeffery Watkins -
make sure that firefox is completely closed down after you edit the file.  that means everything.... including shortcuts you may have on Windows Quick Launch bar.... 
In reply to N Hansen

Re: How to paste text using Firefox?

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
If you look at your extensions (Tools/Extentions), you'll see a list of extensions you have installed. ChromEdit, shows up as 'not compatible' on mine, and when I check for updates, indicates that there isn't one yet for the new FireFox.

mike
In reply to Mike Churchward

Re: How to paste text using Firefox?

by N Hansen -
Mike-That's bizarre, because it doesn't show up as not compatible on my computer. . I've got version 0.1.1 of Chromedit and 20040913 Firefox PR 1.0 running happily together-just no cut and paste.
In reply to N Hansen

Re: How to paste text using Firefox?

by W Page -
Hi N!

I have placed a bug report at Mozilla.org about ChromEdit.  I just upgraded to FF v1PR as well and upgraded ChromEdit because it would not work in v.9.3.  After the upgrade, ChromEdit no longer works.  Really annoying, but such a neat tool!.

As soon as I get some info about it will pass it along here.

WP1
In reply to N Hansen

Re: How to paste text using Firefox?

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Well, I was relying on the extensions tool and the update option. Turns out that there is a new version of ChromEdit that works with the new Firefox - it just wasn't being found by the update option.

Installed the new one, and it works fine.

mike
In reply to Mike Churchward

Re: How to paste text using Firefox?

by W Page -
Hi Mike!

Where did you find it??

WP1
In reply to W Page

Re: How to paste text using Firefox?

by N Hansen -
WP1-I followed your instructions exactly, that's how I found a working copy...wink
In reply to W Page

Re: How to paste text using Firefox?

by Samuli Karevaara -
You said to add "http://www.moodle.org" to allowclipboard.sites. Should it be just "http://moodle.org"?
In reply to Samuli Karevaara

Re: How to paste text using Firefox?

by N Hansen -
You're right Samuli. It's working now!!!!  approve
In reply to N Hansen

Re: How to paste text using Firefox?

by Josep M. Fontana -
Yes, indeed, problem solved. I followed Lars Jensen recommendation and it works. I also managed to install the new version of chromeEdit. As useful as this tool is, though, now it is of no use to fix the 'cut and paste' problem since in order to solve this problem one must modify the prefs.js file, not the user.js file as before. And this file cannot be modified using ChromeEdit.

Josep M.
In reply to Josep M. Fontana

Re: How to paste text using Firefox?

by N Hansen -
In my case, I modified the user.js file with Chromedit and doing so solved the cut and paste problem. You shouldn't have to make changes to prefs.js. Here's the text I put in my user.js file (cut and pastedbig grin):

user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org http://moodle.org");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");


Just make sure to close and open your browser again after you paste this.
In reply to N Hansen

Re: How to paste text using Firefox?

by W Page -
Hello Everyone!

Finally it works!

I am sorry about the http://www.moodle.org, in that it should be just  http://moodle.org but, I hope folks like the tool anyway.

Probably needs a "How To" in the Docs Course.

WP1

In reply to N Hansen

Re: How to paste text using Firefox?

by Samuli Karevaara -
Cool! I'm happy that it worked. And, though nobody likes a smartass, I have to repeat what I "told you so" earlier: "Final catch is to have the URL correctly in the file." പുഞ്ചിരി
In reply to N Hansen

Re: How to paste text using Firefox?

by Bryan Williams -
Thanks for all the great feedback on this issue. Seems you can't just modify your prefs.js or user.js (if one exists) in a text editor like Notepad. The change will not persist each time Firefox is launched. You must make this change using Chromedit, which allows you to create/append the user.js file. Then.... much joy! cool 
In reply to Bryan Williams

Re: How to paste text using Firefox?

by Samuli Karevaara -
I'm sorry to add to the confusion but: you can edit user.js and prefs.js with notepad. But Firefox has to be closed while editing, otherwise it will overwrite your changes when you close it (Firefox). ChromEdit might overcome this (allows to have Firefox open while editing those files) somehow. This is my understanding of the situation, at least...
In reply to Samuli Karevaara

Re: How to paste text using Firefox?

by Bryan Williams -
Samuli,
This was not the case, at least for me. Closing Firefox and editing pref.us in Notepad produced a change that lasted for as long as Firefox (when relaunched) remained open. The next instance of Firefox simply overwrites the pref.us file. The only way I have found to make this change permanent is with Chromedit. Maybe others had a different experience with Win XP and Firefox, but that was mine.
In reply to Bryan Williams

Re: How to paste text using Firefox?

by Karin van den Berg -
My experience for Firefox PR:

You CAN edit user.js in a text editor
You have to restart Firefox TWO TIMES for the changes to take effect, at least when FF is open during editting.

The urls divided by spaces DOES work, I used without www.
Ctrl-V does work, at least for moodle implementations (i.e. this forum and my own moodle), but for some strange reason not in the mentioned mozilla demo at mozilla.org, when entering multiple sites in the settings (at least, I think it worked when just with mozilla.org, when adding moodle.org and my own domain, the moodle things still worked with ctrl-v, the mozilla.org one didn't. Weird)
For subdomains (i.e. something.bbb.com), adding bbb.com is not sufficient, add url including subdomain (http://something.bbb.com)

I hope this is somewhat helpful, I got very frustrated because the dividing by spaces didn't seem to work and sometimes even one site didn't, then through coincedence I got the idea you might have to restart the whole thing twice and it worked fine. Again, editting with a text editor (of user.js that is) works fine for me, I restarted a bunch of times now and the settings still work like they're supposed to).