TX Text Control .NET Server

Javascript: Toolbar.getItems Method

Method|Introduced in 32.4.1

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 })));