TX Text Control .NET Server

Javascript: SideBarToggleButton.getAllowedSideBars Method

Method|Introduced in 30.0

Description

Returns the side bars which are currently shown in the side bar toggle / drop down button at the top right of the ribbon bar.

Syntax

<void> SideBarToggleButton.getAllowedSideBars(<SideBarTypeRequestCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the current value.

errorCallback

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

Examples

The following example demonstrates SideBarToggleButton.getAllowedSideBars in a practical document-editing workflow. It returns the side bars which are currently shown in the side bar toggle / drop down button at the top right of the ribbon bar.

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

TXTextControl.sideBarToggleButton.getAllowedSideBars(
    function(sideBarType) {
        if (!sideBarType) {
            console.warn("No side bar type was returned.");
            return;
        }
        
        console.log("get allowed side bars result:", sideBarType);
    },
    onTxError
);