Note: If you've reached this page from a message box in Firefox or another Mozilla product, try using keyboard shortcuts for the Cut, Copy, and Paste commands:
The information on the rest of this page is for Web developers and advanced users. Please do not try to modify this page.
To protect users' private information, unprivileged scripts cannot invoke the Cut, Copy, and Paste commands in Midas, which is Mozilla's rich text editor component. This means that the corresponding buttons on the Mozilla Rich Text Editing demo page will not work. To enable these functions, you must modify your browser preferences.
Warning: Changing these preferences can leave your browser insecure, especially if you grant permission to untrusted sites. Only change these settings as needed to try the demo above and to test your own add-on or Firefox-internal code, and be sure to restore the default settings when you're done!
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-archive.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-archive.mozilla.org")
is not the same as:
user_pref("capability.policy.allowclipboard.sites", "https://www-archive.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-archive.mozilla.org https://developer.mozilla.org")
Again, keep in mind the security risks involved here and be sure to remove permission to access the clipboard once you no longer need it enabled.