Ckeditor5 Templates UI
This module provides an administrative interface for creating and managing reusable content templates within CKEditor 5. Content creators can now easily insert pre-designed blocks, such as call-to-action boxes or multi-column layouts, directly into their content through a dropdown menu in the editor toolbar. Templates are managed via a Drupal admin screen, eliminating the need for developers to manually edit configuration files.
CKEditor 5 lets editors format the text they type, but it offers no built-in way to insert a reusable, predefined block of content — a styled call-to-action box, a two-column section, a standard legal disclaimer — consistently across a site. The CKEditor 5 Template module adds a "Template" dropdown to the toolbar for exactly this, but the templates themselves have to be defined by hand-editing a JSON file on the server. That puts every template change in a developer's hands and out of reach of the content team.
This module adds a complete administration UI on top of CKEditor 5 Template. Content teams create, edit, reorder, and delete templates from an ordinary Drupal admin screen — each with a title, description, icon, and HTML body — and they appear immediately in the editor's Template dropdown. No JSON files, no code, no developer round-trip. Templates are stored as configuration entities, so they export and deploy cleanly from development to production like any other Drupal configuration.
New to Drupal? Think of it this way: the CKEditor toolbar normally only helps you style text you type in yourself. This module adds a "Template" menu to that toolbar, filled with ready-made content blocks your team has prepared — click one and its layout drops straight into the page. Every editor reuses the same building blocks instead of rebuilding them by hand, and a site builder manages the whole library from a single admin page.
Use it whenever non-technical editors need to insert consistent, reusable content structures inside body fields, and you want them to manage those templates themselves rather than filing a ticket every time a snippet changes.
Features
The module registers a configuration entity for CKEditor 5 templates and a draggable management screen for it, then feeds those templates to the CKEditor 5 Template plugin, which renders them as a dropdown in the editor toolbar. Choosing a template inserts its HTML at the cursor. The upstream JavaScript is reused as-is, so there is nothing to compile and no build step.
Key features include:
- Manage templates from an admin UI (Administration → Configuration → Content authoring → CKEditor 5 templates) — add, edit, delete, and drag to reorder — instead of hand-editing a JSON file.
- Each template has a Title (shown in the dropdown), an optional Description (shown as the tooltip), an optional inline-SVG icon, and an HTML body composed in a rich-text field.
- Templates are stored as configuration entities, so they are exportable and deployable through Drupal's configuration management (dev → staging → production) and version-controllable.
- The Template dropdown appears in any CKEditor 5 text format where the Template button is enabled; selecting an item inserts its predefined HTML at the cursor.
- Reorder templates with a native drag-and-drop weight table; the dropdown order follows the list.
- Reuses the upstream
ckeditor5_templateJavaScript unchanged — there is no bundled or compiled JS to drift out of date, and no webpack build step to maintain. - Templates are served to the editor through a small, cacheable JSON endpoint whose URL is versioned by a content hash, so the dropdown reflects your changes as soon as you save.
- Administration is gated behind a dedicated Administer CKEditor 5 templates (UI) permission.
- 100% free — no CKEditor commercial license or premium subscription is required.
When and why would someone use this module? Use cases include:
- Landing pages: let editors drop in a standard hero, call-to-action box, or feature grid without rebuilding the markup each time.
- Editorial consistency: ship a library of approved snippets — disclaimers, author bios, promo blocks — that every editor reuses identically.
- Config-driven and multisite teams: define templates once, export them to configuration, and deploy the exact same set across environments and sites.
- Works in: any content type, Paragraphs, Layout Builder blocks, and any entity with a CKEditor 5 text field that has the Template button.
Post-Installation
Enabling the module does not create a new content type. It adds one admin screen and integrates with your existing CKEditor 5 text formats:
- Install the dependency and the module:
composer require drupal/ckeditor5_template, then enable this module (drush en ckeditor5_templates_uior via Extend). - Grant the Administer CKEditor 5 templates (UI) permission to the roles that should manage templates (Administration → People → Permissions).
- Go to Administration → Configuration → Content authoring → CKEditor 5 templates (
/admin/config/content/ckeditor5-templates-ui) and add your first template: a Title, an optional Description and inline-SVG icon, and the HTML body. - Go to Administration → Configuration → Content authoring → Text formats and editors, edit a text format that uses CKEditor 5, and drag the Template button into the active toolbar. Save.
- When editors create or edit content in that format, a Template dropdown appears in the toolbar; choosing an entry inserts its HTML at the cursor.
- Make sure the text format permits the HTML your templates produce (through its enabled plugins, or Source Editing / General HTML Support), so the inserted markup is preserved on save.
Clear caches (drush cr, or via Administration → Configuration → Performance) if the Template button or the admin screen do not appear immediately after enabling the module.
Additional Requirements
This module requires no external libraries or third-party APIs. Its requirements are:
- Drupal core
^10.3 || ^11 || ^12 - CKEditor 5 Template — this module is the administration UI for it and depends on it.
- Core CKEditor 5 module — enabled automatically as a dependency of CKEditor 5 Template.
Compatibility note: CKEditor 5 Template and the premium "Content templates" feature from CKEditor 5 Plugin Pack both register the same CKEditor 5 plugin (template.Template) and cannot run on the same page. If your site uses the premium Content templates feature, disable it — or remove its button from your text formats — before using this module, otherwise the editor will fail to load.
Similar projects
- CKEditor 5 Template — the module this project builds on. It provides the Template dropdown and its JavaScript, but templates must be defined by hand-editing a JSON file on the server. This module adds the administration UI so editors and site builders manage templates as configuration, without touching files. It is a dependency, not a competitor — listed here for clarity.
- CKEditor Templates UI — the original, now unmaintained module that provided a UI for the CKEditor 4-era template plugin. This project is a maintained successor, rebuilt for CKEditor 5 and Drupal 10.3+/11/12, with templates stored as configuration entities.
- CKEditor 5 Plugin Pack — Content Templates — the official CKEditor Templates feature, which requires a paid CKEditor commercial license key. This module is free and stores its templates as Drupal configuration entities that you fully control.
- Paragraphs — a structured-content approach where each block is a real entity with its own fields. It is the right tool when you need queryable, individually editable structured data. This module is lighter: templates are reusable HTML snippets inserted inline into a text field, with no new entity created per block.
- Layout Builder (Drupal core) — full-page and block-level composition. This module works at the field level, inside a CKEditor text area, so it complements Layout Builder rather than competing with it — editors reuse content blocks within individual text fields without any additional site builder configuration.
If none of the above fits your workflow, this module is worth evaluating as a straightforward, free way to give your content team a self-service template library inside CKEditor 5.
Recommended projects
I also maintain and recommend the following modules. None of them rewrite or override Drupal's core output — they integrate cleanly with the existing system, extend its native capabilities, and work well alongside this module:
- CKEditor Advanced Container — adds flexbox container and column layouts inside CKEditor 5. Save a container layout as a template with this module so editors can drop a ready-made multi-column section in one click.
- CKEditor Extras — a set of small CKEditor 5 authoring enhancements (table, style, and font tools) that extend the editor without replacing core behavior.
- CKEditor Spacing — lets editors set margin and padding on individual block elements from CKEditor 5, stored as data attributes and rendered with a companion filter.
- CKEditor Media Image Style — adds an image-style selector to the CKEditor 5 media toolbar so editors can pick a display size per embed, without creating new view modes.
-
CKEditor Media Title — lets editors set a custom
titleattribute on media images embedded through CKEditor 5, directly from the media toolbar. -
Htaccess — provides a UI for managing
.htaccessrules from the Drupal admin interface, useful for hardening production without manual file editing.
Commercial Support
This module is developed and maintained by Nelo. The maintainer is available for professional consulting and architectural guidance on CKEditor 5 integrations, content authoring workflows, media systems, and production Drupal implementations.
Supporting this Module
- Check out our sponsor, Dom Host Seo, who made this module possible with their support!
Community Documentation
Currently no external videos or demo sites are available. The module includes help text accessible via Help → CKEditor 5 Templates UI.
For questions, bug reports, or feature requests, please use the issue queue on Drupal.org.
Depends on
Dependencies of the latest stable release
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.0 | Stable | 10–11 | Initial stable release. | Sep 25, 2026 |