DS Server

Javascript: Selection.isCommonListFormatValueSelected Method

Method|Introduced in 24.0

Description

Informs about whether an attribute from the ListFormat.Attribute enumeration has the same value for the complete selection.

Syntax

<void> Selection.isCommonListFormatValueSelected(<ListFormat.Attribute> listFormatAttribute, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
listFormatAttribute

Specifies a possible value from the enumeration.

callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

The following example demonstrates Selection.isCommonListFormatValueSelected in a practical document-editing workflow. Informs about whether an attribute from the ListFormat.Attribute enumeration has the same value for the complete selection.

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

function isCommonListFormatValueSelected(listFormatAttribute) {
    TXTextControl.selection.isCommonListFormatValueSelected(
        listFormatAttribute,
        function() {
            console.log("is common list format value selected completed.");
        },
        onTxError
    );
}