TableCellPropertiesConfig
The configuration of the table cell properties user interface (balloon).
Properties
module:table/tableconfig~TableCellPropertiesConfig#backgroundColorsThe color palette for the table cell background color picker.
Copy codeconst tableConfig = { tableCellProperties: { backgroundColors: [ { color: 'hsl(0, 0%, 100%)', label: 'White', hasBorder: true }, { color: 'hsl(120, 75%, 60%)', label: 'Green' } ] } };Note: This configuration only affects the UI. It does not limit or filter the colors in the data.
Defaults to
defaultColors.Related:
module:table/tableconfig~TableCellPropertiesConfig#borderColorsThe color palette for the table cell border color picker.
Copy codeconst tableConfig = { tableCellProperties: { borderColors: [ { color: 'hsl(0, 0%, 0%)', label: 'Black' }, { color: 'hsl(0, 0%, 100%)', label: 'White', hasBorder: true } ] } };Note: This configuration only affects the UI. It does not limit or filter the colors in the data.
Defaults to
defaultColors.Related:
colorGridColumns?: numbermodule:table/tableconfig~TableCellPropertiesConfig#colorGridColumnsThe number of columns in the
borderColorsandbackgroundColorspalettes of the table cell properties balloon.
Copy codeconst tableConfig = { tableCellProperties: { colorGridColumns: 8 } };Defaults to
defaultColorGridColumns.colorPicker?: false | ColorPickerConfigmodule:table/tableconfig~TableCellPropertiesConfig#colorPickerConfiguration of the color picker in the table cell properties balloon.
If set to
falsethe picker will not appear.module:table/tableconfig~TableCellPropertiesConfig#defaultPropertiesDefault styles for newly created table cells.
Copy codeconst tableConfig = { tableCellProperties: { defaultProperties: { borderStyle: 'dashed', borderColor: 'hsl(0, 0%, 90%)', borderWidth: '3px', horizontalAlignment: 'center', verticalAlignment: 'middle', padding: '10px' } } }Note: The model does not store the default values. The editor will only keep values that differ from the defaults.
See
TableCellPropertiesOptionsfor the full list of properties.scopedHeaders?: booleanmodule:table/tableconfig~TableCellPropertiesConfig#scopedHeadersIf set to
true, thescopeattribute will be applied to table headers (<th>) based on their position in the table.The table cell properties UI will extend a dropdown with two more options that allow manually setting the header scope:
Column header— setsscope="col"on<th>.Row header— setsscope="row"on<th>.
If header cell is both in a heading row and a heading column, the
colscope will be prioritized by the header rows and columns setting logic. In such case, the user can manually change the scope using the table cell properties UI.To disable this behavior:
Copy codeconst tableConfig = { tableCellProperties: { scopedHeaders: false } };Defaults to
true