--- title: Security preferences slug: Midas/Security_preferences translation_of: Mozilla/Projects/Midas/Security_preferences ---
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.
For Firefox:
user.js
file from that directory in a text editor. If there's no user.js file, create one.user.js
:
user_pref("capability.policy.policynames", "allowclipboard"); user_pref("capability.policy.allowclipboard.sites", "https://www.mozilla.org"); user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess"); user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");ser_pref("capability.policy.policynames", "allowclipboard"); user_pref("capability.policy.allowclipboard.sites", "https://www.mozilla.org"); user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess"); user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
https://www.mozilla.org
to the site for which you want to enable this function.user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org")
is not the same as:
user_pref("capability.policy.allowclipboard.sites", "https://www.mozilla.org")
This is because the first uses HTTP while the second uses HTTPS.
If you want to allow multiple URLs to access the Paste operation, separate the URLs with a space. For example:
user_pref("capability.policy.allowclipboard.sites", "https://www.mozilla.org https://developer.mozilla.org")