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 #3312164: Incompatible with CKEditor 5 in Drupal 9.5.

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

CommentFileSizeAuthor
#5 DAT 3996_Retest.odt1.09 MBminsharm

Issue fork patternkit-3347660

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

slucero created an issue. See original summary.

slucero’s picture

I'm planning to push back the Beta 7 release for #3327256: Beta 7 Release Plan to the end of April, and I would like to include this in it. Ideally that will allow us to get everything tested more completely and include a more complete and functional release of the CKEditor 5 support.

slucero’s picture

Issue summary: View changes
Status: Active » Needs review
minsharm’s picture

StatusFileSize
new1.09 MB

Retested the issue and content is being updated now in source view mode within the sidebar layout builder as well as in the new window on both D9 and D10.

Attaching Screenshots.

slucero’s picture

Status: Needs review » Reviewed & tested by the community

This has been re-tested and verified internally at Red Hat. Merging for inclusion in the Beta 7 release.

  • slucero committed e75fada9 on 9.1.x
    Issue #3347660 by slucero, minsharm: CKEditor 5 Source Editing Mode May...
slucero’s picture

Status: Reviewed & tested by the community » Fixed

Merged for inclusion in the Beta 7 release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.