DS Server

Javascript: Selection.isCommonPageBorderValueSelected Method

Method|Introduced in 24.0

Description

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

Syntax

<void> Selection.isCommonPageBorderValueSelected(<PageBorder.Attribute> pageBorderAttribute, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
pageBorderAttribute

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.isCommonPageBorderValueSelected in a practical document-editing workflow. Informs about whether an attribute from the PageBorder.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 isCommonPageBorderValueSelected(pageBorderAttribute) {
    TXTextControl.selection.isCommonPageBorderValueSelected(
        pageBorderAttribute,
        function() {
            console.log("is common page border value selected completed.");
        },
        onTxError
    );
}