FireFox 支援豐富文字編輯器的做法

因為firefox在複製~貼上網頁文件的時候
須要做一些調整~
原廠文如下~

1.離開firefox(假如你在執行中)
2.去這個路徑
C:\Documents and Settings\<登入名稱>\Application Data\Mozilla\Firefox\Profiles\<唯一目錄>.
3.開打user.js這個檔案~如果不存在~就建一個新的
4.複製下面的內容

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

到開啟的檔案中貼上~存檔~再執行………就搞定了

原廠文如下

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.

For Firefox:

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

    C:\Documents and Settings\<Windows login>\Application Data\Mozilla\Firefox\Profiles\<one folder>.
    (See also editing configuration files for more info on locating your profile folder.)

  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");
    *Change the url "http://www.mozilla.org" to where you want to enable this function.
  5. Save the file, and restart Firefox. The Clipboard buttons should now function.

Note: The preference is site as well as protocol specific. For example

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)
(the first is http and the second is 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",
"http://www.mozilla.org https://www.mozilla.org")
For more information about security policies, see http://www.mozilla.org/projects/security/components/ConfigPolicy.html.

(最近我登入論壇轉跳都失敗~不知道在這有沒有關係)

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *