CKEditor 5 Source Editing Mode May Not Save Content

Created on 13 March 2023, over 1 year ago
Updated 17 April 2023, about 1 year ago

Problem/Motivation

When the CKEditor5 editor is in source editing mode it no longer emits the data change event which is being monitored to update the related JSON Editor field and the final instance config field on the form. Once the editor is changed back to regular mode, the change event fires and everything is updated, but if the form is submitted without changing this back, the data may be lost.

This issue is split from and builds on top of the CKEditor5 functionality added in ✨ Incompatible with CKEditor 5 in Drupal 9.5 Fixed .

Steps to reproduce

During these test steps, make sure to open your browser console and monitor for errors being logged.

  • Install a fresh drupal 9.5/10 site
  • Enable Patternkit, Patternkit Example, CKEditor5, and Layout Builder modules
  • Go to /admin/config/user-interface/patternkit/json
  • Set Wysiwyg editor to "CKEditor 5" and Basic HTML from CKEditor toolbar.
  • Create a basic page content type and add PK [Example block] from layout builder.
  • Add content in the "Formatted Text" field with CKEditor
  • Click the "..." and click the "Source" button to edit markup
  • Click the form's "Add block" button to place the block on the page
  • Expect to see no console errors and the block with the formatted content present on the page

Proposed resolution

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Fixed

Version

9.1

Component

Schema Editor

Created by

πŸ‡ΊπŸ‡ΈUnited States slucero Arkansas

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

Comments & Activities

Production build 0.69.0 2024