Javascript: MisspelledWord.getStart Method
Description
Gets the starting position of a misspelled word. It is a one-based index of the word's first character.
Syntax
<void> MisspelledWord.getStart(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the starting position of a misspelled word. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates MisspelledWord.getStart in a practical document-editing workflow. It gets the starting position of a misspelled word. It is a one-based index of the word's first character.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectStart(misspelledWord) {
misspelledWord.getStart(
function(result) {
console.log("get start result:", result);
},
onTxError
);
}