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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Screenshot 2021-04-27 at 6.32.24 PM.png | 127.03 KB | anand.toshniwal93 |
| #4 | Screenshot 2021-04-27 at 6.32.10 PM.png | 147.6 KB | anand.toshniwal93 |
Issue fork ckeditor5-3209643
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
Comment #2
anand.toshniwal93 commentedworking on this so assigning to myself
Comment #4
anand.toshniwal93 commentedComment #5
wim leersWell … that looks like a potentially easy fix! 🤓 @zrpnr, can you review? 😊
Comment #6
zrpnr🤦♂️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
Comment #8
zrpnrComment #9
wim leers#6: nice digging 😊
@anand.toshniwal93 THANK YOU! :D