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