RibbonItem Interface
A detached catalog entry describes an existing tab, group or control. Use its language-independent ID as a configuration key, rather than its localized label.
Type-only browser declaration from @txtextcontrol/tx-sheet-control; it is not a runtime constructor.
Syntax
interface RibbonItem {
id: string;
type: 'tab' | 'group' | 'button';
label: string;
parentId?: string;
enabled: boolean;
visible: boolean;
}
Members
| Member | Description |
|---|---|
| id | Language-independent scoped ID, stable across editor instances for the same built-in control. |
| type | Item category. The button category also includes selectors and input controls. |
| label | Current localized accessible label, useful for an application settings UI. It is not a stable configuration key. |
| parentId | Owning tab or group ID; omitted for top-level tabs. |
| enabled | Effective enabled policy, including ancestors and native control availability. Enabling policy does not override sheet protection or selection restrictions. |
| visible | Effective visibility policy, including ancestors. It does not report actual onscreen presence, active tabs, contextual availability, overflow or scrolling. |
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',
});
const item = editor.ui.ribbon.items.find(item => item.id === 'home.font.bold');
if (item) editor.ui.ribbon.configure({ buttons: { [item.id]: { enabled: 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.