DS Server

Javascript: EditableRegion.getHighlightMode Method

Method|Introduced in 28.0

Description

Gets a value indicating whether the editable region is highlighted.

Syntax

<void> EditableRegion.getHighlightMode(<RequestHighlightModeCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the property value.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates EditableRegion.getHighlightMode in a practical document-editing workflow. It gets a value indicating whether the editable region is highlighted.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function inspectHighlightMode(editableRegion) {
    editableRegion.getHighlightMode(
        function(result) {
            if (!result) {
                console.warn("No highlight mode was returned.");
                return;
            }
            
            console.log("get highlight mode result:", result);
        },
        onTxError
    );
}