EditorSpellcheckFeature
EditorSpellcheckFeature =
object
What a host reaches through editor.getFeature(EDITOR_SPELLCHECK_FEATURE).
Methods
Section titled “Methods”issueAt()
Section titled “issueAt()”issueAt(
offset):SpellIssue|null
The marked word at offset, edges included; only words on or near the screen are marked.
Parameters
Section titled “Parameters”offset
Section titled “offset”number
Returns
Section titled “Returns”SpellIssue | null
replace()
Section titled “replace()”replace(
offset,word):boolean
Replaces the marked word at offset as one undoable edit. False when nothing is marked there.
Parameters
Section titled “Parameters”offset
Section titled “offset”number
string
Returns
Section titled “Returns”boolean
setAcceptedWords()
Section titled “setAcceptedWords()”setAcceptedWords(
words):void
Words never marked, in every editor sharing this editor’s spellcheck service.
Parameters
Section titled “Parameters”readonly string[]
Returns
Section titled “Returns”void
suggestions()
Section titled “suggestions()”suggestions(
offset,limit?):Promise<readonlystring[]>
Replacements for the marked word at offset, best first; empty when nothing is marked there.
Parameters
Section titled “Parameters”offset
Section titled “offset”number
limit?
Section titled “limit?”number
Returns
Section titled “Returns”Promise<readonly string[]>