MozillaZine

Spell checking

From MozillaZine Knowledge Base

(Difference between revisions)
Revision as of 02:02, 26 March 2012
Dickvl (Talk | contribs)
(Setting up the spell checker - ui.SpellCheckerUnderline* prefs)
<-- Previous diff
Revision as of 20:32, 23 April 2012
DavideAndrea (Talk | contribs)
(Spell Checker - Spelling error (ironically enough))
Next diff -->
Line 1: Line 1:
==Spell Checker== ==Spell Checker==
-Firefox has a built-in spelling checker, but it is not immediately available even for checking the spelling within input text boxes. The steps outlined here explain how to get the dictionary active for within text-boxes, adding words to it's dictionary, removing incorrectly added words, and extending use of the spell checker to check any webpage not just input text-boxes.+Firefox has a built-in spelling checker, but it is not immediately available even for checking the spelling within input text boxes. The steps outlined here explain how to get the dictionary active for within text-boxes, adding words to its dictionary, removing incorrectly added words, and extending use of the spell checker to check any webpage not just input text-boxes.
Misspelled words in text boxes will be identified by a wavy underscore, and can be retyped correctly or you can right-click on the word and choose the correct word from the boldfaced spelling suggestions in the context menu, or use "Add to dictionary" just below the suggestions. Misspelled words in text boxes will be identified by a wavy underscore, and can be retyped correctly or you can right-click on the word and choose the correct word from the boldfaced spelling suggestions in the context menu, or use "Add to dictionary" just below the suggestions.

Revision as of 20:32, 23 April 2012

Contents

Spell Checker

Firefox has a built-in spelling checker, but it is not immediately available even for checking the spelling within input text boxes. The steps outlined here explain how to get the dictionary active for within text-boxes, adding words to its dictionary, removing incorrectly added words, and extending use of the spell checker to check any webpage not just input text-boxes.

Misspelled words in text boxes will be identified by a wavy underscore, and can be retyped correctly or you can right-click on the word and choose the correct word from the boldfaced spelling suggestions in the context menu, or use "Add to dictionary" just below the suggestions.

Once set up properly so that the spelling check works in a text area, you can have the built-in spelling checker check any webpage, by making the document editable with a bookmarklet. You might want to assign a keyword shortcut such as "spellcheck:" in the bookmarks properties or if on the Bookmarks Toolbar simply name it "Sp" with or without an assigned keyword shortcut.

javascript:document.body.contentEditable='true';%20document.designMode='on';%20void%200

The above bookmarklet will place the entire webpage into Edit Mode which will allow you to check the spelling on the entire page.

While you are in Edit Mode, you will not be able to use browser features such as links. F5 (Reset) will restore browser to normal usage.

Setting up the spell checker

To enable the built-in Firefox spell checker, if it is not initially working in a text box:

  • "Tools -> Options -> Advanced -> General / Browsing -> Check my spelling as I type" should be checked (default setting).
  • Set the layout.spellcheckDefault preference to 2 (default = 1)
  • Set the spellchecker.dictionary preference to your locale (e.g., to en-US for US English)
  • Restart Firefox if you made any setting changes and then test spell checking.

If Firefox does not identify misspelled words in the text area, or allow you to add a word when right clicking, then exit Firefox and create persdict.dat with notepad (file can be empty) in your Firefox profile folder, restart Firefox, and retest.

Any page with a text-box will allow you to make the initial spell checking tests. The search box in the right-hand column of this page will serve the purpose. Words typed are tested upon use of spaces or other delimiters.

Try these as test words: xghi Google goggleplex splinter xdfe;

Even though the Add to Dictionary does not allow you to change the capitalization of a word when adding the word, you can correct the capitalization first, before rechecking to see if it really needs to be added to the dictionary.

In Firefox versions starting with Firefox 3.6 you can change the default wavy underline style via the hidden Integer pref ui.SpellCheckerUnderlineStyle to 0:none, 1:dotted, 2: long dots, 3:line, 4:double line, 5:wavy line (default).
You can set the color of the underlining via the String pref ui.SpellCheckerUnderline (default is red #FF0000) and the thickness of the underlining via the Integer pref ui.SpellCheckerUnderlineRelativeSize (default is 1.0 * 100 -> 100).
See also about:config

Modifying your custom dictionary

Most of the words you add to your custom dictionary will probably be from use of "Add to dictionary" from the context menu.

You will need to use a text editor to remove words incorrectly added to your persdict.dat file, or to manually merge other entries into it such as from Microsoft Word as an example of where you may have already added a lot of custom entries to a dictionary.

[Windows Users] The entries in persdict.dat are one word per line, if you see the words together with no space then edit with another text editor and if you then see the words each on their own lines, save the file. Should then look correct in notepad, and notepad can be used to make any manual changes such as deletions.

Extensions

"After the Deadline - Spell and Grammar Checker" extension (86 KB), see options good to go after check-marking wanted grammar rules. Activated by "F4" (default PFkey).

See also

External links