TX Sheet Control

RibbonApi Interface

Interface

The editor-owned ribbon controller changes command density, display mode and built-in item policies. Obtain it from editor.ui.ribbon.

Type-only browser declaration from @txtextcontrol/tx-sheet-control; it is not a runtime constructor.

Syntax

interface RibbonApi {
    visible: boolean;
    layout: RibbonLayoutMode;
    displayMode: RibbonDisplayMode;
    readonly items: RibbonItem[];
    configure(options: RibbonOptions): void;
    reset(): void;
}

Members

MemberDescription
visibleWhole-ribbon visibility, shared with editor.ui.areas.ribbon. Hiding the ribbon retains its item policies.
layoutCommand density: classic (default) or compact. Compact keeps a curated command row with complete groups in overflow.
displayModeCommand display: expanded (default) or tabs-only. Tab selection in tabs-only opens a temporary panel.
itemsA readonly property returning detached catalog entries. Includes contextual commands; context-specific gallery choices can appear when created.
configureAtomically validates and merges a partial patch. Omitted settings are preserved. Unknown or wrong-kind IDs throw RangeError; invalid values throw TypeError.
resetClears every item policy and restores classic, expanded presentation. Whole-ribbon visibility is preserved.

Examples

Use a mounted editor to configure the commands available for editing a report.

import { Spreadsheet } from '@txtextcontrol/tx-sheet-control';

function configureEditor(host: HTMLElement) {
    const editor = new Spreadsheet(host, {
        license: 'YOUR_SIGNED_LICENSE',
        height: 600,
        fontCatalogURL: '/assets/sheet/fonts/catalog.json',
    });
    editor.ui.ribbon.visible = false;
    return editor;
}

Remarks

Settings belong to the editor, survive workbook loads and are excluded from workbook serialization. Item policies customize screen commands; they do not restrict workbook API calls or keyboard editing. Use worksheet protection for document editing rules.

See Also

Replace YOUR_SIGNED_LICENSE with your issued Trial, Developer or OEM token before running the editor example.