This module adds custom background and border color options to tables and table cells within CKEditor 5. It allows administrators to define their own color palettes, optionally include default colors, and even enable a color picker for editors to select custom hues.
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
- Go to Configuration → Content authoring → Text formats and editors.
- Edit a format that uses CkEditor 5 (for example Full HTML).
- Ensure Insert table is in the active toolbar.
- Open the Table Colors plugin settings (CkEditor 5 plugin settings).
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 (
0hides 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
Save the text format when finished.
Using it while editing content
On any field that uses that text format (including nested CkEditor paragraphs):
- Edit the field / paragraph.
- Use Insert table in the CkEditor toolbar.
- Select the table or a cell, then open table / cell properties to apply background or border colors from your 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:
- Wojciech Kukowski (salmonek)
- Dawid Olszewski (dolszewski)
Use the issue queue for bugs and feature requests.
Ask your assistant about CkEditor5 Table Colors
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- ckeditor5 Drupal core
- editor Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.