Javascript: SideBarToggleButton.setAllowedSideBars Method
Description
Sets the side bars which are shown in the side bar toggle / drop down button at the top right of the ribbon bar. The value TXTextControl.SideBarType.None or 0 removes the button altogether.
Syntax
<void> SideBarToggleButton.setAllowedSideBars(<SideBarType> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| value | A bitwise combination of one or more SideBarType values. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates SideBarToggleButton.setAllowedSideBars in a practical document-editing workflow. It sets the side bars which are shown in the side bar toggle / drop down button at the top right of the ribbon bar. The value TXTextControl.SideBarType.None or 0 removes the button altogether.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.sideBarToggleButton.setAllowedSideBars(
TXTextControl.SideBarType.TrackChanges,
function() {
console.log("set allowed side bars completed.");
},
onTxError
);