6. The "Check Spelling" dialog box

This dialog box is displayed by clicking the "Check Spelling" button which is next to the "Automatic Spell Checker" button found in the status bar.

Procedure for checking current document for spelling errors:

  1. Click on the Start button.

  2. During the check spelling session, use any of the buttons described below.

  3. The check spelling session can be stopped by

    • clicking on Stop,

    • OR typing Esc.

Default language

Selects the language of the dictionary used by the spell checker when such language is not specified in the element being checked for spelling (typically through the use of an attribute such as lang or xml:lang).

It is possible to switch from a default language to another at any time. In such case, when the default language is actually used (that is, when lang or xml:lang attributes have not been specified), the spell checker is automatically restarted with the other dictionary, beginning at the last word for which the spell checker has found an error.

The last selected default language is recorded in the user preference file in order to be automatically chosen in subsequent XXE sessions.

Example 9.1. Default language versus actual language example

In this example,

  • Test.xhtml does not have xml:lang attributes set on its elements, which means that the default language, English, is used to spell check this document.

  • Except, in span containing "le petit cha est mort" where attribute xml:lang has been set to fr. This means that for that element only, the default language, English, is ignored and that a French dictionary will be used.

    In the above screenshot, notice that the actual language of span "le petit cha est mort", fr, is displayed at the top/right of the "Check Spelling" dialog box.


Replace

Replaces the erroneous word by the content of the Replace with text field.

An empty text field may be used to delete the erroneous word.

Replace All

Replaces all occurrences of the erroneous word by the content of the Replace with text field.

This button is disabled for errors other than "Unknown word" or "Improperly capitalized word".

Ignore

Skips the word for which the spell checker has found an error.

Ignore All

Skips all occurrences of the word for which the spell checker has found an error.

This button is disabled for errors other than "Unknown word" or "Improperly capitalized word".

Skip Element

Skips the element containing the word for which the spell checker has found an error.

Learn

Records the word in the personal dictionary for currently selected language.

This button is disabled for errors other than "Unknown word" or "Improperly capitalized word".

About learned words

When a spell checking session is started, it automatically knows all the words learned during past and current spell checking sessions.

A “spell checking session” is started each time:

  • You click the Start button of the "Check Spelling" dialog box.

  • You open a document and auto spell checking is turned on for this document.

  • Auto spell checking was turned off and you manually turn it on for the document being edited. This is done by clicking the "Automatic Spell Checker" button found at the left of the status bar.

Limitations:

  • Words learned during past and current spell checking sessions are acquired when a new session is started, and never in the middle of a session.

    Example: let's suppose auto spell checking is turned on for all documents. Document A and document B are both opened in XXE. You use the popup menu of the automatic spell checker to force XXE to learn word "foo" in document A. You switch to document B which also contains word "foo". Word "foo" is still underlined in document B.

  • "Ignore All" words and "Replace All" words are not shared by spell checking sessions.

Start from caret

If this option is turned on, spell checking starts from the current caret position. If this option is turned off, spell checking starts from the beginning of the document.