com.ephox.editlive.spelling
Interface SpellerLoader
public interface SpellerLoader
Class used to load the spell checker.
EditLive! will call the load(Collection)
method on a background thread, so this class can block while loading classes or downloading resources as necessary.
- Since:
- 8.0
load
SpellChecker load(Collection<String> customDictionaryWords)
throws SpellerLoaderException
- Synchronously loads the SpellChecker. EditLive! handles calling this on a background thread, so blocking here will not cause the editor to freeze.
- Parameters:
customDictionaryWords
- List of words in the user's custom dictionary at the time this function is called. These words are intended for use as suggestions.
This list should not be retained; it is not mutated by EditLive!, new custom word notifications are sent through SpellChecker.addWord(String)
.
- Returns:
- Instance of
SpellChecker
that is ready to be used by EditLive!
- Throws:
SpellerLoaderException
- if loading failed for any reason. Returning null on failure is not recommended, as an error allows for meaningful log messages in the debug log.