Javascript: Toolbar.getItems Method
Description
Returns the current main-toolbar items. The returned array can be changed without changing the toolbar configuration.
Syntax
<(ToolbarItem|DefaultToolbarItemDescriptor)[]> Toolbar.getItems()Return Value
Current toolbar items.
Examples
The following example demonstrates toolbar.getItems in a practical Document Viewer workflow. Gets the items of the toolbar.
const toolbarItems = TXDocumentViewer.toolbar.getItems();
console.table(toolbarItems.map(item => ({ title: item.title })));