## NimbudocsEditor. spellChecker

### Methods

changeAllWords(word)async

  Replaces all words matching the word at the caret position with the indicated word.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `word` | String | The replacement word.

changeWord(word)async

  Replaces the word matching the word at the caret position with the indicated word.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `word` | String | The replacement word.

checkNext()Array.<String>async

  Advances the spell checker to the next word that is incorrectly spelled.

  Note: if an incorrectly spelled word is already selected or the caret is inside an incorrectly spelled word, the next check will not advance to another word until the word at the caret position is no longer marked as an incorrect word (either by changing it, ignoring it or learning it).

  See:
    - `NimbudocsEditor.spellChecker#learnWord`
    - `NimbudocsEditor.spellChecker#ignoreWord`
    - `NimbudocsEditor.spellChecker#changeWord`

  ##### Returns:

  - Array.<String>
  An array of spelling suggestions for the next word encountered by the spell checker.
fetchDictionary(persistenceLevel)Object async

  Retrieves all learned words from the server-side spellcheck dictionary of this editor instance with the specified persistence level as a map where the language is key and a list of words is the value.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `persistenceLevel` | String | The persistence level of the dictionary to add the word to (can be "personal" or "application").

  ##### Returns:

  - Object
  An object with language strings as key and a list of word strings as value.
ignoreAllWords()async

  Ignores all words matching the word at the caret position for the current editor session.

ignoreWord()async

  Ignores the word at the caret position for the current editor session.

learnWord(word, language, persistenceLevel)async

  Adds a word to the server-side spellcheck dictionary of this editor instance.

  Words learned with persistenceLevel application will be stored on the Nimbudocs Editor server if the applicationDictionaryDir parameter was configured. Please see Server Configuration for details. Words stored on the server persist through editor sessions or server restarts.

  Words learned with persistenceLevel personal

  are not stored beyond the lifetime of the server-side editor instance and need to be stored externally.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `word` | String | The word to add to the dictionary.
  `language` | String | The language to learn the word for.
  `persistenceLevel` | String | The persistence level of the dictionary to add the word to (can be "personal" or "application").

setDictionary(wordsByLanguage, persistenceLevel)Object async

  Sets a list of learned words for multiple languages and the specified persistence level as server-side spellcheck dictionary of this editor instance.

  This method clears all other learned words

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `wordsByLanguage` | Object | An object of members namded after a language that stores its respective word lists as {String} array.
  `persistenceLevel` | String | The persistence level of the dictionary to add the word to (can be "personal" or "application").

  ##### Returns:

  - Object
  An object with language strings as key and a list of word strings as value.
unlearnWord(word, language, persistenceLevel)async

  Removes a word from the server-side spellcheck dictionary of this editor instance. If persistenceLevel application is used, the word will be removed from the server-side application dictionary (if possible).

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `word` | String | The word to add to the dictionary.
  `language` | String | The language to learn the word for.
  `persistenceLevel` | String | The persistence level of the dictionary to add the word to (can be "personal" or "application").