A New Table Landed White in the Middle of a Dark Page

At Hanaro's internal handbook, every page runs charcoal grey with pale text. The design is built to be easy on the eyes through long shifts. A team lead drops a roadmap table into this week's update. It lands as a flat white rectangle with black borders, the one bright patch on the page. Readers notice the table before they read what is written in it.

Setting the Style a New Table Gets

A table dropped into an editor carries whatever look ships as the default. That means a thin grey border, a white cell background, a plain header row. Nothing about the page around it changes that. The same table renders identically on a charcoal wiki page and on a plain white one. A fix that holds has to let someone set that look once, as a named style. That beats repainting each table by hand after it lands on the page. Without a saved template, matching the page falls to whoever happens to format that one table. The next person who inserts one starts again from the same default grid.

Synap Editor stores table appearance as a set of named templates. Each one carries its own colors, borders and header-row styling. The editor applies the chosen template the moment a table is inserted. The table arrives already dressed, instead of landing blank and getting fixed up after the fact. For Hanaro's handbook, a developer can add a Dark Mode template. It carries light grey text and a near-black background, with a thin dark border around every cell. A second template, Rainbow, can carry a red header row and a yellow highlight on every second row. The rest of the body turns blue. Once either template is saved, a table inserted anywhere in the handbook picks up those colors and borders automatically. It no longer lands in the default grey-and-white grid.

Choosing Which Templates Appear in the Popup

Defining a template is only half the job. The table insert popup and the table properties dialog each show their own grid of style thumbnails. Those thumbnails are arranged in rows of up to four. A template only appears there if its name is listed. Without that listing, Dark Mode and Rainbow sit in the configuration file, defined and ready. They stay invisible to anyone opening the insert popup. Each thumbnail in that grid shows a small preview of its template. An editor picks by what the table will look like, rather than by a name alone.

Listing a template adds it to the popup and the properties dialog at the same time. Each one gains a new row of thumbnails, after whatever rows already exist. The popup gains a third row with two new thumbnails, Dark Mode and Rainbow, sitting below the default styles. The properties dialog, opened from the table itself after insert, shows the same two templates in its own list. A table can be restyled after the fact, without reopening the popup.

Fix the Table Width So It Doesn't Overflow

A table inserted at a percentage width recalculates against whatever contains it. In a fixed-width layout, like Hanaro's handbook, that can still run wider than the content column. That happens once borders and padding are counted in. The table then pushes past the edge of the page instead of sitting inside it. Fixing the width at the moment of insert avoids that calculation entirely.

Switching a new table to a fixed pixel width, measured against its parent container, stops that overflow before it starts. Once turned on, every table a user inserts lands at the same pixel width. That width matches the column it sits in. It stays there regardless of how the percentage math would have worked out. The table's right edge lines up with the rest of the page, instead of running past it. The fix only reaches tables inserted after it is turned on. A table already on the page, or one pasted in from somewhere else, keeps the width it already has.

How to Control Which Handles and Popups Show

The row and column handles that appear around a selected table bring their own grey bars and plus buttons. Those are styled by the editor, rather than by Hanaro's page. A team that builds its own cell toolbar, to match the handbook's own icon set, ends up with two separate sets of table controls. Both compete for the same space.

Turning off the row and column handles clears those grey bars and plus buttons from around a selected table. The whole-table select handle and the resize handle in the corner stay in place. An editor can still select the whole table and drag its corner to resize it. Only the row and column bars, and their small plus buttons for inserting a row or column in place, disappear. In their place, a rebuilt cell toolbar can carry the handbook's own buttons: inserting and deleting rows and columns, merging and splitting cells, and the rest of the cell properties. Only one set of controls shows up around a selected cell.

Does the 'Brand' Template Match Your Document?

Back at Hanaro's handbook, the team lead opens the table insert popup to check the fix. Two new thumbnails now sit in a third row below the originals: Dark Mode and Rainbow. Each shows a small preview of its own colors and header styling. Clicking into either one no longer means guessing what will land on the page.

Dark Mode produces a table with the same pale grey text and near-black fill as the page around it. Its border uses that same dark grey, rather than the editor's default black line. Rainbow is used on a different, more colorful page. It inserts a table with a red header row, yellow stripes on every second row, and a blue body beneath. The colors, the border, and the width all come out matching the preview shown in the popup. None of it reverts to the editor's stock grid.

[[shot: the table insert popup open with a third row of two thumbnails, Dark Mode and Rainbow, and a just-inserted Rainbow table showing a red header row, alternating yellow rows, and a blue body]]

For anyone who only reads a ticket about how a table looks, that match is the whole story. The team lead closes this week's update without filing a single complaint about the table, because nothing about it looks out of place anymore.

What to Try Next in Synap Editor

This setup covers what a table looks like the moment it lands on the page. It doesn't cover anything past that moment. Resizing a table responsively after it has been inserted sits outside what is covered here. So does editing a template's colors through a UI dialog instead of the configuration file.

For handle styling beyond turning the default bars off, check the Balloon Popup documentation. It covers the full set of actions available for the cell balloon. That includes the ones left out of the handbook's own list. For how table width behaves as the page itself resizes, check the Responsive View documentation. It covers what happens to a fixed-width or percentage table once the viewport changes. That is a separate question from the width a table gets at the moment it is inserted. Both documents assume the insert-time look from this setup stays as the starting point. What changes afterward, by resizing or by a reader's own screen, is their subject, not this one.

Turning These Fixes On

Five settings in synapeditor.config.js turn on everything described above. Add only the ones a given page needs.

// synapeditor.config.js
{
  'editor.table.template.styles': {
    'Dark Mode': {
      defaultStyle: {
        color: 'rgb(220,220,220)',
        backgroundColor: 'rgb(30,30,30)',
        borders: { type: 'solid', width: 1, color: 'rgb(60,60,60)' }
      }
    },
    'Rainbow': {
      header: { backgroundColor: 'red' },
      isEven: { backgroundColor: 'yellow' },
      defaultStyle: { backgroundColor: 'blue' }
    }
  },
  'editor.table.template.list': {
    popup: [
      // ...existing rows
      ['Dark Mode', 'Rainbow']
    ],
    dialog: [
      // ...existing rows
      ['Dark Mode', 'Rainbow']
    ]
  },
  'editor.table.defaultWidthUnit.px': true,
  'editor.table.handle': false,
  'editor.balloon': {
    tableCell: [
      'fill', 'selectBorder', 'borderColor', 'lineThickness', 'lineStyle', 'fitTableWidth', '-',
      'insertRowBefore', 'insertRowAfter', 'insertColBefore', 'insertColAfter',
      'deleteRow', 'deleteCol', 'deleteTable', '-',
      'contentsAlign', 'verticalAlign', 'cellSize', 'mergeCell', 'splitCell',
      'cellProperties', 'tableProperties'
    ]
  }
}
  • editor.table.template.styles defines named templates like Dark Mode and Rainbow. The editor applies the chosen one the moment a table is inserted.
  • editor.table.template.list lists which templates show as thumbnails in the popup and dialog, as rows of up to four.
  • editor.table.defaultWidthUnit.px, set to true, fixes new tables to their container's pixel width.
  • editor.table.handle, set to false, hides the row and column handles. The whole-table select and resize handles stay in place.
  • editor.balloon.tableCell rebuilds the cell balloon with insert, delete, merge, split, and cell-property actions for rows and columns.

Common questions

Does editor.table.template.styles overwrite an existing style name, or only add new ones?
It is stored as a map from template name to definition. Supplying a style under a name that already exists overwrites that one entry. Names you don't reuse are added alongside the existing templates, rather than replacing the whole set.

What happens if I list five templates in one popup row?
The material doesn't say what happens when a row holds more than four entries. The documented structure is rows of up to four. It doesn't describe behavior past that limit, so this is worth checking directly rather than assuming.

What if I add a template key to popup or dialog that isn't defined in template.styles?
The material doesn't describe what happens when a popup or dialog entry names a template that editor.table.template.styles never defines. It documents no fallback and no error for that mismatch. Treat it as unconfirmed, rather than assuming either outcome.

If I don't set borders.bottom on a template, what border does the cell get?
The material lists which top-level keys a template definition can set: color, background, borders, display and layout. But it doesn't describe per-side border fallback behavior. It doesn't say what a cell gets when one side, like the bottom border, is left unset.