[2.1.0] Add Ckeditor5 integration

Created on 13 September 2024, 7 months ago

Problem/Motivation

With UI Patterns 2.0, we cover most of the Drupal Core display builders:

  • ui_patterns_blocks: Block Layout, Layout Builder ....
  • ui_patterns_layouts: Layout Builder, Field Layout...
  • ui_patterns_field_formatters: Manage Display, Layout Builder, Views...
  • ui_patterns_views: Views

However, one is still missing: Ckeditor5.

There is already a module to use Layout plugins in Ckeditor5: https://www.drupal.org/project/ckeditor_layouts
However:

Proposed resolution

We can take inspiration from UI Icons module

Contrib:

Preview:

  • The modal is placing a placeholder (<drupal-icon data-icon-id> in UI Icons) in the Ckeditor virtual DOM with all the component configuration (component id, variant, slots, props)
  • An HTTP controller is generating the preview using the Render API

Rendering:

Configuration:

  • in the text format configuration page, in the CKEditor 5 plugin settings, we can chose the components we want to expose like that

https://git.drupalcode.org/project/ui_icons/-/tree/1.0.x/modules/ui_icon...

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇫🇷France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024