Javascript: EditableRegion.setHighlightColor Method
Description
Sets the highlight color for the editable region.
Syntax
<void> EditableRegion.setHighlightColor(<string> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| value | Highlight color for the editable region. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates EditableRegion.setHighlightColor in a practical document-editing workflow. It sets the highlight color for the editable region.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function configureHighlightColor(editableRegion) {
editableRegion.setHighlightColor(
"#ffd54f",
function() {
console.log("set highlight color completed.");
},
onTxError
);
}