Interface nsIEditorSpellCheckType

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Adds a word to the current personal dictionary.

    See

    mozSpellChecker::AddWordToDictionary

    Parameters

    • word: string

    Returns void

  • Check a given word. In spite of the name, this function checks the word you give it, returning true if the word is misspelled. If the word is misspelled, it will compute the suggestions which you can get from GetSuggestedWord().

    See

    mozSpellChecker::CheckCurrentWord

    Parameters

    • suggestedWord: string

    Returns boolean

  • When interactively spell checking the document, this will return the value of the next word that is misspelled. This also computes the suggestions which you can get by calling GetSuggestedWord.

    See

    mozSpellChecker::GetNextMisspelledWord

    Returns string

  • Fills an internal list of words added to the personal dictionary. These words can be retrieved using GetPersonalDictionaryWord()

    See

    • mozSpellChecker::GetPersonalDictionary
    • GetPersonalDictionaryWord

    Returns void

  • Used after you call GetPersonalDictionary() to iterate through all the words added to the personal dictionary. Will return the empty string when there are no more words.

    Returns string

  • Used to get suggestions for the last word that was checked and found to be misspelled. The first call will give you the first (best) suggestion. Subsequent calls will iterate through all the suggestions, allowing you to build a list. When there are no more suggestions, an empty string (not a null pointer) will be returned.

    See

    mozSpellChecker::GetSuggestedWord

    Returns string

  • See

    mozSpellChecker::IgnoreAll

    Parameters

    • word: string

    Returns void

  • Turns on the spell checker for the given editor. enableSelectionChecking set means that we only want to check the current selection in the editor, (this controls the behavior of GetNextMisspelledWord). For spellchecking clients with no modal UI (such as inline spellcheckers), this flag doesn't matter. Initialization is asynchronous and is not complete until the given callback is called.

    Parameters

    • editor: nsIEditor
    • enableSelectionChecking: boolean
    • callback: nsIEditorSpellCheckCallback

    Returns void

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Removes a word from the current personal dictionary.

    See

    mozSpellChecker::RemoveWordFromPersonalDictionary

    Parameters

    • word: string

    Returns void

  • Use when modally checking the document to replace a word.

    See

    mozSpellChecker::CheckCurrentWord

    Parameters

    • misspelledWord: string
    • replaceWord: string
    • allOccurrences: boolean

    Returns void

  • Call this to free up the spell checking object. It will also save the current selected language as the default for future use.

    If you have called CanSpellCheck but not InitSpellChecker, you can still call this function to clear the cached spell check object, and no preference saving will happen.

    Returns void

  • Update the dictionary in use to be sure it corresponds to what the editor needs. The update is asynchronous and is not complete until the given callback is called.

    Parameters

    • callback: nsIEditorSpellCheckCallback

    Returns void

  • Returns true if we can enable spellchecking. If there are no available dictionaries, this will return false.

    Returns boolean

  • See

    mozSpellChecker::SetCurrentDictionaries

    Parameters

    • dictionaries: invalid

    Returns any

  • Used to filter the content (for example, to skip blockquotes in email from spellchecking. Call this before calling InitSpellChecker; calling it after initialization will have no effect.

    Parameters

    • filterType: number

    Returns void

  • Check a given word then returns suggestion words via Promise if a given word is misspelled. If not misspelled, returns empty string array.

    Parameters

    • aCheckingWorkd: string
    • aMaxCount: number

    Returns any

Generated using TypeDoc