Skip to content
TREB Docs

Configuration

For a full list of embedding options, see the API page.

Options in HTML tags

If you are embedding a spreadsheet using an HTML tag, pass options as attributes. If an option is boolean (true or false), you can just use the attribute name to mean “true”.

<treb-spreadsheet toolbar scale-control scale=".9" />
<treb-spreadsheet toolbar scale-control scale=".9" />

That will enable the toolbar, show the scale slider (hover over the scale value to see it), and set the initial scale to 90%.

Options set as attributes use kebab-case; any time there are multiple words in an option name, they are separated with a hyphen (-). Options set in script use snake_case, separated by underscores (_).

If you are setting options as HTML attributes, you can use any option from the API but switch the underscores to hyphens.

Options in the ES module

If you are emedding using script, pass an options object when you call CreateSpreadsheet:

import { TREB } from '@trebco/treb';
TREB.CreateSpreadsheet({
container: element,
toolbar: true,
scale_control: true,
scale: .9,
});
import { TREB } from '@trebco/treb';
TREB.CreateSpreadsheet({
container: element,
toolbar: true,
scale_control: true,
scale: .9,
});