Gets the misspelled word of the specified kind at the specified text input position. If there is no misspelled word, the next possible word is returned. If there is no misspelled word of the specified kind between the specified input position and the end of the text, the first word of the specified kind is returned.

Introduced: X18.

<void> MisspelledWordCollection.getItemAtTextPosition(<number> textPosition, <MisspelledWordKind> kind, <RequestMisspelledWordCallback> callback, [<ErrorCallback> errorCallback])

Parameters

Parameter Description
textPosition Specifies a zero-based text postion. The text positions in front of a word and behind a word belong to the word. If there is no misspelled word, the next possible word is returned. If there is no misspelled word between the specified text position and the end of the text, the first word is returned.
kind Specifies the word's kind.
callback Receives the misspelled word.
errorCallback Optional. Is called when the operation failed with an error.