Here is an example file:
edit those hosts to match yours and rename the file to user.js.txt -> user.js
I kept putting "quotes" around each URL like this:
I still get the warning but the ctrl X C & V function works fine both on my site and Moodle.
Do you have a screenshot of that warning. Is it the same one that appeared before?
- Janne -
The warning is gone now and everythings working fine except for when I insert a link and then I have to hit cancel on the link editor to close it. The link works fine but the action of inserting it is a little awkward. I'll try and change some settings and see if that fixes it.
Thanks again for the great editor.
John
http://texturizer.net/firefox/extensions/#chromedit
Once you install this extension you can go to Tools => Edit User Files and you will get this panel:
Were you able to get multiple site editing working properly? I did by finally following the instructions closely. I kept using "" around each URL
"http://www.site1.com http://www.site2.com http://www.site3.com" - could copy and paste to all three sties but could not use the ctrl+c ctrl+v keys - had to use the edit => copy paste from the browser menu.
"http://site1.com http://site2.com http://site3.com" - can copy and paste using keystrokes (ctrl+c ctrl+v) as well as menu items.
I am not 100% sure of this, however, as I have went throught so many gyrations with this thing, that I lost track of the things I did and the orders I did them in (enough to cast some doubt on my suggestion). But I still think it is worth a try if someone can't get the ctrl+c ctrl+v keys to work.
I inserted the lines in the various pref.js files but that didn't work. I used the CromEdit solution and created the user.js file, which contain only those four lines of script. I assume haven't caused any conflicts in my system ().
It is possible that the changes in the pref.js file didn't work is due to not changing the url from mozilla to my site. Anyway, the cut and paste functions work now.
Thanks for the fix.
Jim Depow
My user.js file looks like this:
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http://domain1.com http://moodle.org http://domain2.com");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
In contrast to what I posted in an earlier post, I later found that it did not matter if the "www" was put in the URL or not.
As I understand it (at least as well as one can understand Firefox .8 ), the contents of user.js are merged into the prefs.js file each time Firefox is started, so manual changes to prefs.js would be overwritten.
It is frustrating to not be able to get Firefox to behave, but then again it is a ".8" release. I do like the browser very much but I still find myself going back to IE from time to time to get away from the sorts of problems described above. Hopefully, its developers will get some of these types of problems sorted out by 1.0
Now, having said all that, I just thought I would try a ctrl-v here in this post in Firefox and it worked! I am at a loss to understand the logic (or illogic) of this behavior.
All the other sites worked but moodle.org
moodle.org needed "http".
All the other sites worked when they were written without "http"
This is my "user.js" file in the directory:
C:\Windows\Profiles\Teemu\Application Data\Mozilla\Profiles\f\
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "opitaan.fi http://moodle.org moodle.fi");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
I needed to restart the computer when I made the changes to the file.
Teemu
Where do I can find file "user.js" ?
or
Where do I must to place file "user.is" ?
Help me!
you,re cracks!!
Wonderfully explained!!
The next step was to create it. I did so, but it doesn't work. But... in /usr/lib/mozilla/defaults/pref I saw a file called "all.js". I edited it, and -more o less- in line 450, there were two sentences:
// Clipboard
pref("capability.policy.default.Clipboard.cutcopy", "NoAccess");
pref("capability.policy.default.Clipboard.paste", "NoAccess");
I changed them:
// Clipboard
pref("capability.policy.default.Clipboard.cutcopy", "AllAccess");
pref("capability.policy.default.Clipboard.paste", "AllAccess");
and it works... I think that it isn't the best way because of the security... but now we haven't got problems with the html editor.
(I'm sorry for my English...)
Bye.
It sounds as if your are using one of the specific Debian distributions, LinEx or Guadalinex. Is this true. If not, what distro are you using, please?
Thanks
Then, I updated it.
Tranks for your answer.
For me, the KEY was keeping the user.js file in the directory
%AppData%\Mozilla\Firefox\Profiles\xxxxxxxx.default\
While some other changes (eg stopping banner ads) go into its subdirectory
%AppData%\Mozilla\Firefox\Profiles\xxxxxxxx.default\chrome\
Putting the following into
%AppData%\Mozilla\Firefox\Profiles\xxxxxxxx.default\user.js
using Notepad, was all it took to get the cut/copy/paste to work in the Moodle environment.
// Clipboard
user_pref("capability.policy.default.Clipboard.cutcopy","AllAccess");
user_pref("capability.policy.default.Clipboard.paste", "AllAccess");
VERY HELPFUL TIP: Paul Norrod's suggestion to get Chromedit
http://texturizer.net/firefox/extensions/#chromedit
...it saves alot of pondering over file-hunting in WinXP (or Win anything).
I'm using Mac OS X (10.3.6) and Firefox 1.0 (just downloaded it last week).
The paste function doesn't work when I try to copy something from WORD. However I can copy something from a browser page, and while the paste icon doesn't work, CTRL-V works.
(There is no problem pasting WORD text using CTRL-V if I use Safari. The problem with Safari is that there is no editing toolbar at all, so all the other editing functions are gone.)
I tried pasting the two suggested lines into the prefs.js file (it seems not to be named user.js in the MAC version, but rather prefs.js) and there is no difference. I know I'm using the right preferences file, because if I delete it and then re-start Firefox, it creates a new copy.
Any ideas?
--Todd Woofenden
Firefox help says about user.js:
The file does not exist by default, so you need to create it before you can start adding your preferences.
Hope this helps
Martin
I tried creating that file, and also adding the relevant lines to the prefs.js file to allow the clipboard. (prefs.js seems to be Firefox for Mac's equivalent to user.js).
At first I thought It had fixed the problem, until I have discovered that cutting and pasting works from some applications and not from others, regardless of the fix.
For instance, I can't cut and paste from WORD for Mac, with or without the fix, but I can cut and paste from Textedit, with or without the fix. (So bottom line, the fix doesn't work.)
This is pretty much a fatal flaw in Firefox, so please let me know if you come across any other fixes.
Thanks!
Please try to create a file named user.js. It does not exist by default - neither on windows nor on linux. You _must_ create it. Enter the following text and restart Firefox (changes are not immediate):
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http://moodle.org");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
Don't give up!
Martin
Adding those four lines to the prefs.js was a guess, since that is the main preferences file. But that doesn't work, either.
Thanks for the note -- still searching!
--Todd
Hi Todd,
If memory serves - I too had to play a little before getting it to work.
In Foxfire, what do you see under Tools / Edit user files? Do you see a tab called user.js?
If so check where the file is saved (says at bottom of window) and try pasting the following to it:
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "www.yoursite.com");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
Hope this helps.
Jeff
You wrote that you are using a Mac. Checking with the Firefox homepage:
http://www.mozilla.org/support/firefox/edit
your user.js file might have to be in a different location.
"On Mac OS X, the path is usually ~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/"
It also says that you can use the about:config setting in the borwser address window.
HTH,
Bill
I am using Gentoo Linux and Firefox.
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http://moodle.org ttp://localhost/typo3/typo3/alt_main.php http://localhost/ http://localhost/typo3/ http://localhost/typo3/typo3",");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
user_pref("capability.policy.allowclipboard.sites", "http://moodle.org ttp://localhost/typo3/typo3/alt_main.php http://localhost/ http://localhost/typo3/ http://localhost/typo3/typo3","); <--- last "," was wrong ;)
Where do I must to place file "user.js" ?????
i made a file called user.js....but i am not able to understand where should i put this file....
can u give me any idea abt that....
any help will be appreciable//
ragards..
Raju
Anyone have some clues on how to deal with this?
Thank you,
Richard
However, note that using Symbol to represent Greek characters will not work on student/client/other machines because they may not have that font...
Hi,
I have used FF before and was able to edit my user.js file to allow cut and paste. I have recently installed FF (1.0.2) on a new machine, have added Chrome edit, and modified the user.js file as before but no luck. I realize this has been discussed in great detail in this forum, but I am still struggling.
I can copy by right clicking the mouse, but can't paste, and I can't copy or paste using the html buttons.
The following are the lines in user.js and pref.js. Any ideas or suggestions are greatly appreciated.
Thanks,
Jim
user.js
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org http://198.164.135.10/moodle");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
pref.js
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 http://198.164.135.10/moodle");
user_pref("capability.policy.policynames", "allowclipboard");
Remove the "/moodle" string from the line. Keep just plain "http://198.164.13.10 " (or the domain name).
And you will need only one copy, you do not need to have it twice in user and prefs.
- Enrique -
It worked (your reply is pasted in this message using FF )! One reason this was so important, other than the frustration, is that I am promoting Moodle within our college system. The bug (MS IE not Moodle) with MS IE sometimes not displaying properly, and needing to use the Enlarge Editor to see the text, would be very confusing to new users. I will promote the use of FF as well.
Thanks so much,
Jim
Hi James,
Remove the "/moodle" string from the line. Keep just plain "http://198.164.13.10 " (or the domain name).
And you will need only one copy, you do not need to have it twice in user and prefs.
i am using mozilla..
could you tell me where we can have this file ..user.jsand pref.js
same problem we are facing here(Cut /Copy /Paste)
please do something regarding this issue..
ragards..
Raju
Setting Prefs for the Mozilla Rich Text Editing Demo
To protect users' private information, unprivileged scripts cannotinvoke the Cut, Copy, and Paste commands in the Mozilla rich text editor, so thecorresponding buttons on the Mozilla Rich Text Editing demo page will not work. To enablethese functions for purposes of the demo, you must modify your browserpreferences.
- Quit Mozilla. If you have Quick Launch running(in Windows, an icon in the toolbar), quit that too.
- Find your Mozilla profile directory. On Windows, this is oftenlocated in
c://WINNT/Profiles/<your Windows login>/Application Data/Mozilla
.(See also editing configuration filesfor more info on locating your profile folder.) - Open the
user.js
file from that directory in a text editor.If there's nouser.js
file, create one. Add these lines to
user.js
:user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");- Save the file, and restart Mozilla. The Clipboard buttons should now function.
3. Open the
user.js
file from that directory in a text editor.If there's no user.js
file, create one.
And...Click on the link in my post above for more information on this.
I'm hoping this will clear everything up finally for everyone (except that we shouldn't have to do this in the first place).
BTW, on the topic of Firefox, has anybody else noticed that typing an apostrophe in the editor is now bringing up the Firefox "Find in this page" popup? Weird stuff.
- Unzip to a local path, I don't think this will execute correctly from a network.
- ffPaths.dat contains your server paths (i.e., http://moodle.luther.edu). One per line, no spaces. Needs to be in the same local directory as the executable.
- Overwrites any user.js info already there (I never ran into anyone who had this file before they tried to edit in Moodle anyway so I didn't think this would be a problem)
- Appends "http://localhost" to whatever other paths you specify in your ffPaths.dat file.
- Gives you plenty of opportunities to opt out.
- Set to work with XP, don't know if it works with anything else cuz (unfortunately) we don't have much of anything else.
p.s. There are three ways to paste into the editor and this doesn't fix them all. I've seen postings (at least one from MD) indicating the fix for those problems. This just turns at least two of them on.
Good fortune to all
Thank you all for the tips. I have now enough information to get through the cut/copy/paste firefox bug.
Best
Christina
I downloaded your exe file and would love to have a look at the code you used to create it. I have downloaded AutoIt but I cannot convert the exe file back into a .au3 AutoIt file without a passphrase. Would it be possible for you to post the original .au3 file to this forum.
I am wanting to create an exe file that can be downloaded on its own and run by our students without them having to unzip and then run the file, so I would need to edit the exe and add our moodle url to it.
Thank you
Jessica
Thank you The script works great on our network and I'll be distributing it to students very soon.
Thanks for your help.
Jessica
Hi Bob,
Thanks again for your code. Just thought I'd let you know though that after version 0.9 of Firefox the default folder name changes from default.{randomstring} to {randomstring}.default, so in order to get your script to work on both old and new versions of Firefox I changed your default.* code to *default* and it now works on both old and new versions of Firefox.
Hope this helps.
Jessica
c:/Archivos de programa/Mozilla/Firefox/defaults/profile
it is a script (or something like that, sorry) of 1KB (I mean that I have successfully created it), withthe lines I have been said in "setting prefs for the mozilla rich text editing demo".
I have even restarted the computer, but still it doesn't work, and I can't paste text from word. What could I do?. Thank you very much.
I struggled in solution of cut 'n' paste issue.
My conclusion is
1. created user.js under
C:\Documents and Settings\sekimoto\Application Data\Mozilla\Firefox\Profiles\twy4dzmx.sekimoto
2. edited user.js below
----------------------
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "eldemo.sra-osc.ne.jp");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
----------------------
eldemo.sra-osc.ne.jp is my site.
First, I create user.js in
C:\Documents and Settings\sekimoto\Application Data\Mozilla\Firefox\Profiles\f617y2u3.default
It is wrong. create user.js in Profiles\xxxxxxxx.sekimoto , Perhaps my own folder.
and first time, I discribe user.js so that
user_pref ("capability.policy.allowclipboard.sites", "http://www.moodle.org");
It is wrong. discribe My site and never discribe "http://"
Environment Variable %AppData% id always
C:\Documents and Settings\sekimoto>echo %AppData%
C:\Documents and Settings\sekimoto\Application Data
Hence, I did nothing for AppData.
PS.
OS version of my PC is Windows 2000 SP4.
Firefox 1.0.6
Thank you.
--
SEKIMOTO Shoichi
Any ideas on a way to enable copy -n- pasting without losing formatting and without editing script. If not does anyone have a "script fix for dummies" that I can use and share with others.
Thanks
Maybe some details about what your problem is might help -- what version of Firefox are you using, what version of Moodle, what OS are you using, etc. What are the symptoms of the problem you're having?
Andy
I know this subject has proven to be a problem, but i would like to (if possible) use this to my advantage.
I want to stop people being able to (copy &) paste information into moodle on quizes specifically. Is there anyway at all to get this done? or is it an editor only thing?
(i realise people can edit the files to get round this, but my course users are mainly not very I.T. orientated)
and
Is there a way to check if people are using a (Mozilla) Firefox browser and not let people take (or logon to the course) the quiz if they are not using Firefox?
Just a shot in the dark really......
Thanks for any responses
Steve
Here is a link to an add-on from Firefox. It should allow you to copy & paste. After I installed it, I logged into Moodle and went to where I was experiencing the script error. In the bottom left corner of the dialog box where I was typing there was a little message in red telling me that copying and pasting was not available. When I clicked on the message it allowed me to add my moodle site to a list that would allow copying and pasting.
Here is the link: https://addons.mozilla.org/en-US/firefox/addon/allowclipboard-helper/.