Problem/Motivation

Using Quick Edit, it is not possible to insert a media element with CKEditor 5.

Using the Umami theme, the console shows:
Uncaught Error: Quick Edit could not associate the rendered entity field markup (with [data-quickedit-field-id="..."]) with the corresponding rendered entity markup: no parent DOM node found with [data-quickedit-entity-id="..."]. This is typically caused by the theme's template for this entity type forgetting to print the attributes.

This may be an Umami problem, and not a CKEditor 5 problem, however the drupalMedia plugin is also not loading correctly.
Console also shows:

toolbarview-item-unavailable 
Object { name: "drupalMedia" }

Steps to reproduce

Edit a node, insert a media element using CKEditor 5.
Visit the node, enable quickedit.
Media embed toolbar item is missing and console shows 1 or both warnings.

Proposed resolution

Issue fork ckeditor5-3209643

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

zrpnr created an issue. See original summary.

anand.toshniwal93’s picture

Assigned: Unassigned » anand.toshniwal93

working on this so assigning to myself

anand.toshniwal93’s picture

Assigned: anand.toshniwal93 » Unassigned
Status: Active » Needs review
StatusFileSize
new147.6 KB
new127.03 KB

decoupled-editor-media

media-dialog-bartik

wim leers’s picture

Well … that looks like a potentially easy fix! 🤓 @zrpnr, can you review? 😊

zrpnr’s picture

Status: Needs review » Reviewed & tested by the community

🤦‍♂️ah... good catch @anand.toshniwal93 !

That fixes the problem! Everything seems to function normally, I'm able to edit the node, see the media preview, add new media.

I'm still seeing a console error when editing a textarea field that contains media. Looks like it's not anything related to CKEditor 5 though. Got the same error with CK4.

Found this likely issue: #3101267: Quick Edit could not associate the rendered entity field markup

zrpnr’s picture

Status: Reviewed & tested by the community » Fixed
wim leers’s picture

#6: nice digging 😊

@anand.toshniwal93 THANK YOU! :D

Status: Fixed » Closed (fixed)

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