copy paste clipboard mozilla

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
MediaHound

copy paste clipboard mozilla

Post by MediaHound »

This seems as good as any forum to post this concern.
Firstly, two thumbs up for cms made simple. I have a lot of websites and I will be using cms made simple to manage the content on them, provided my first experience with it on this first site I'm revamping goes well.
That being said, this is my concern, and what brought me here:
I use Mozilla. I installled cms made simple, and am trying to paste old data from the old design into the wysiwyg editor. However when I click paste, or ctrl v (whatever) I get the dialogue box pop up telling me that Unprivledged scripts cannot access Cut/Copy/Paste programatically for security reasons. Click OK to see a technical note at Mozilla.org which shows you how to allow a script to access the clipboard.

Image

So when accepting the page, It takes me to:
http://www.mozilla.org/editor/midasdemo ... prefs.html
Save yourself the walk there and you can read what it says here:
Setting Prefs for the Mozilla Rich Text Editing Demo

To protect users' private information, unprivileged scripts cannot invoke the Cut, Copy, and Paste commands in the Mozilla rich text editor, so the corresponding buttons on the Mozilla Rich Text Editing demo page will not work. To enable these functions for purposes of the demo, you must modify your browser preferences.

1. Quit Mozilla. If you have Quick Launch running (in Windows, an icon in the toolbar), quit that too.
2. Find your Mozilla profile directory. On Windows, this is often located in

c://WINNT/Profiles//Application Data/Mozilla.
3. Open the user.js file from that directory in a text editor. If there's no user.js file, create one.
4. 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");
5. Save the file, and restart Mozilla. The Clipboard buttons should now function.

_______________________________________________________

My problem is that there was no
c://WINNT/Profiles//Application Data/Mozilla

Mine would have been
c://WINDOWS/Profiles/All Users/Application Data/Mozilla.
but the only folder in
c://WINDOWS/Profiles/All Users/Application Data
is something donated by the folks at /Adobe
... so I create /Mozilla
.. and create user.js
add the content they tell me to, while typing my domain instead of
user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org");
... save it, restart the browser, navigate to my site's wysiwyg editor, and same thing, same error.
So my Q for the community here is how do I enable copying and pasting?
What did I overlook?

Google desktop search couldnt find any other user.js on the box.
Neither could windows search, it only found the one I created.

muchas gracias

Jarred
MediaHound

1 more thing

Post by MediaHound »

PS how would I add an array to the user.js, so I can allow all my sites, as I get to them, to let me copy and paste?
MediaHound

wOOt

Post by MediaHound »

Thanks for the link, it gave me all the info I need.
The workstation is actually on a different computer than I'm writing from, can't write the code to it now, so let's just assume that I got it under control.
Thank you very much, Pat.
Post Reply

Return to “Developers Discussion”