How can I enable right-click copy and paste functions on a website?

When I select some content in the C1 Content Editor, and click Copy or Paste in the context menu, I get the "Clipboard Disabled" security message and can't copy and paste anything.

Can I enable the Clipboard functionality to use right-click Copy and Paste commands?

Answer:

Yes, you can.

In the Mozilla Firefox rich text editor, JavaScript access to the clipboard (and thus Cut, Copy, and Paste commands) is disabled by default for security reasons. You can however modify your browser preferences to enable it:

1. Quit Firefox.

2. Find your Firefox profile directory.

The default location of the Firefox profile is:

  • Windows 7/Vista: C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxxx.default
  • Windows XP/2000: C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default

where <username> is your Windows account user name and xxxxxxxx represents a random string of 8 characters.

3. Open the user.js file from that directory in a text editor.

Note: 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");

(Change the URL "http://www.mozilla.org" to where you want to enable this function.)

Note: To allow multiple URLs, separate the URLs with a space. For example:

user_pref("capability.policy.allowclipboard.sites",

"http://www.mozilla.org https://www.mozilla.org http://www.mysite.net")

5. Save the file, and restart Firefox.