RealObjects Nimbudocs Editor 3.0.3929_Beta1

Namespace: spellChecker


NimbudocsEditor. spellChecker

Methods

changeAllWords(word)

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)

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:
Returns:
  • Promise
Resolved With:
  • Array.<String>
An array of spelling suggestions for the next word encountered by the spell checker.
getDictionary(persistanceLevel)Objectasync

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

Parameters:
Name Type Description
persistanceLevel String The persistance level of the dictionary to add the word to (can be "application", "personal" or "session").
Returns:
  • Promise
Resolved With:
  • Object
An object with language strings as key and a list of word strings as value.
ignoreAllWords()

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

ignoreWord()

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

learnWord(word, language, persistanceLevel)

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

Please note that all of these learned words are not stored beyond the lifetime of the server-side editor instance and need to be stored externally. The persistanceLevel parameter only specifies which dictionary the word will be added to.

Parameters:
Name Type Description
word String The word to add to the dictionary.
language String The language to learn the word for.
persistanceLevel String The persistance level of the dictionary to add the word to (can be "application", "personal" or "session").
setDictionary(wordsByLanguage, persistanceLevel)Object

Sets a list of learned words for multiple languages and the specified persistance 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.
persistanceLevel String The persistance level of the dictionary to add the word to (can be "application", "personal" or "session").
Returns:
  • Object
An object with language strings as key and a list of word strings as value.
unlearnWord(word, language, persistanceLevel)

Removes a word from the server-side spellcheck dictionary of this editor instance.

Parameters:
Name Type Description
word String The word to add to the dictionary.
language String The language to learn the word for.
persistanceLevel String The persistance level of the dictionary to add the word to (can be "application", "personal" or "session").