Conditional Formatting

Release 3.3.0 and above.

Conditional formatting automatically applies pre-defined styles when data inside a table cell meets a specific rule.

You don't need to format each cell manually — once a rule is set, the formatting updates automatically as the data changes.

Conditional formatting overview

Table of Contents

  • Registration
  • Button UI
  • Create Conditional Formatting
    • Format range
    • Format rule
    • Supported rule list
    • Setting date display format
    • Format style
  • Conditional Formatting List
    • Edit
    • Change priority
    • Delete
  • Additional Features

Registration

Add to the toolbar

// synapeditor.config.js
{
  'editor.toolbar': [
    // ...
    'conditionalFormatting',
    // ...
  ]
}

Add to the table cell balloon

// synapeditor.config.js
{
  'editor.balloon': {
    // ...
    'tableCell': [
      'formulaInput', '-', 'fill', 'selectBorder', 'borderColor',
      'lineThickness', 'lineStyle', 'cellSize', 'mergeCell', 'splitCell',
      'fitTableWidth', '-', 'contentsAlign', 'verticalAlign',
      'deleteRow', 'deleteCol', 'cellProperties', 'tableProperties',
      'conditionalFormatting', 'deleteTable'
    ],
    // ...
  }
}

Button UI

The button activates when a cell inside a table is selected.

Clicking opens the conditional formatting dialog.

<table> <thead> <tr><th>Active</th><th>Inactive</th></tr> </thead> <tbody> <tr> <td>

Active state

</td> <td>

Inactive state

</td> </tr> </tbody> </table>

Create Conditional Formatting

A tab where you can create and edit conditional formatting.

Set the format range, rule, and style, then click Confirm to create the conditional formatting.

Create conditional formatting tab

Format range

The range where the conditional formatting will be applied.

Enter in formats like A1, B2 or A1:B2.

Cell range selection

Click the cell range selection button next to the input box to open the cell range selection dialog, where you can drag-select cell ranges.

In cell range selection mode, row/column numbers are displayed on the table handles, making it easy to identify the selected range.

If you append a comma (,) after an existing range, the selection isn't cleared and you can add a new range.

Format range

Cell range selector button

Format rule

Set the condition to compare with cell data.

You can compare with values of types: number, text, date, or cell coordinate.

TypeExample
Number2025
TextComplete
Date2025-12-26, 2025/12/26, 2025.12.26
Cell coordinate=A1

Format rule

Supported rule list

TypeSupported RuleDescription
TextIs emptyCell has no data entered
Is not emptyCell has data entered
Text containsCell data contains the specified text
Text does not containCell data does not contain the specified text
Starts withCell data starts with the specified text
Ends withCell data ends with the specified text
Text exactly matchesCell data exactly matches the specified text
NumberGreater thanCell value is greater than the reference (>)
Greater than or equalCell value is ≥ the reference (≥)
Less thanCell value is less than the reference (<)
Less than or equalCell value is ≤ the reference (≤)
EqualCell value equals the reference (=)
Not equalCell value differs from the reference (≠)
BetweenCell value is within the specified min/max range
Not betweenCell value is outside the specified min/max range
DateToday / Yesterday / TomorrowDate is [today / yesterday / tomorrow]
This week / Last week / Next weekDate is in [this / last / next] week (week is Sunday–Saturday)
This month / Last month / Next monthDate is in [this / last / next] month
This year / Last year / Next yearDate is in [this / last / next] year

About date rule application:

Date rules apply only when the display format is date.

Setting date display format

Change cell date format

Format style

Specifies the style to apply when the format rule is satisfied.

This style takes priority over any existing style applied to the cell.

Format style

Conditional Formatting List

A tab to manage (edit, delete, reorder) the conditional formatting applied to the table.

The higher a rule is in the list, the higher its priority. When a cell satisfies multiple rules simultaneously, the formats are merged.

For overlapping properties, the higher-priority rule wins; non-overlapping properties are combined.

Conditional formatting list

Edit

Click a conditional format to edit it.

Edit conditional format

Change priority

Drag and drop the conditional format handle to the desired location to change its priority.

Delete

Delete conditional format

Additional Features

Conditional formatting tip