Customizable color palettes for CkEditor 5 table and table cell background and border colors.

Machine name: ckeditor5_table_colors.

Requirements

  • Drupal 11 or 12
  • Core CKEditor 5 module (ckeditor5)
  • A text format that includes the Insert table button

Installation

composer require drupal/ckeditor5_table_colors
drush en ckeditor5_table_colors -y
drush cr

Where to configure it

  1. Go to Configuration → Content authoring → Text formats and editors.
  2. Edit a format that uses CkEditor 5 (for example Full HTML).
  3. Ensure Insert table is in the active toolbar.
  4. Open the Table Colors plugin settings (CkEditor 5 plugin settings).

Table Colors settings on a text format

Features

  • Use CkEditor5 default colors — keep the built-in CkEditor palette alongside your custom colors
  • Use CkEditor5 color picker — let editors pick arbitrary colors (hex) in the dropdown
  • Table color columns — number of columns in the color grid
  • Table color document colors — how many "already used in document" colors to list (0 hides that section)
  • Custom colors — add labeled colors for background and/or border

Custom colors

Click Add Table Color, then set:

  • Color label — accessible name shown in the UI
  • Color — swatch value
  • Type — Background Color and/or Border Color

Add a custom table color

Save the text format when finished.

Using it while editing content

On any field that uses that text format (including nested CkEditor paragraphs):

  1. Edit the field / paragraph.
  2. Use Insert table in the CkEditor toolbar.
  3. Select the table or a cell, then open table / cell properties to apply background or border colors from your palette.

CkEditor paragraph in a content form

Insert table in CkEditor 5

Table inside the editor

Cell properties with color palette

Colors come from the text-format configuration above (defaults + custom entries). Disabling the color picker removes free-form picking and leaves only the configured palette.

When to use it

  • Editorial sites that need brand-safe table/cell colors
  • Text formats where Tables are already enabled and you want a controlled palette instead of (or in addition to) a free color picker

Attribution

Based on ideas from CkEditor 5 Plugin Pack maintained by:

Use the issue queue for bugs and feature requests.

Supporting organizations: 

Project information

Releases