In CKEditor 5 v45.2.2 (bundled with Drupal 10.5.8), the `icons.pencil` and `icons.cog` exports were removed from `ckeditor5/src/core`. The entity_embed module's toolbar.js imports these icons, causing a JavaScript error that prevents the widget toolbar from rendering. The Edit and Settings buttons don't appear when clicking an embedded entity.

The fix replaces the icon imports with inline SVG strings that match the original CKEditor 5 pencil and cog icons, restoring toolbar functionality without depending on the removed exports.

Steps to reproduce:
1. Install Drupal 10.5.8+ (which bundles CKEditor 5 v45.2.2)
2. Enable entity_embed module
3. Add an entity embed to content using CKEditor 5
4. Click on the embedded entity
5. Observe that the widget toolbar does not appear (Edit/Settings buttons missing)
6. Check browser console for JS error about missing icon exports

Expected: Widget toolbar appears with Edit and Settings buttons.
Actual: Widget toolbar does not render

CommentFileSizeAuthor
#12 3575503-mr64.patch35.91 KBrichardcapricorn
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

ethant created an issue. See original summary.

caspervoogt’s picture

Issue summary: View changes

I tested MR 64 and it worked on my end.

caspervoogt’s picture

Status: Active » Needs review
dave reid’s picture

justcaldwell’s picture

I can confirm the issue. The patch does restore icons, but the bundled svgs don't look like the standard ckeditor icons (at least for us). See below:

Only local images are allowed.

smustgrave’s picture

Not in front of my computer I can commit code from but if you use

import { IconPencil, IconCog } from '@ckeditor/ckeditor5-icons';

it fixes the problem

dave reid’s picture

Yup, that's what I was going to do since that's how other modules have fixed it, and bump the minimum core version requirement to 10.5.

smustgrave’s picture

dave reid’s picture

Yup, I'm working to combine the two and solve together.

smustgrave’s picture

Awesome thank you!

richardcapricorn’s picture

StatusFileSize
new35.91 KB

Outdated — superseded by !69. This patch only fixed icons.pencil / icons.cog and missed the CKEditor 5 v43 LinkUI._addActionsView() → _addToolbarView() rename, which breaks the link-edit flow on
already-linked embeds in CKEditor 5 v47. Please use !69 instead.

richardcapricorn’s picture

Opened !69 — a clean, source-based fix that supersedes !64 and my outdated patch in #12.

What it changes:
- toolbar.js: replaces icons.pencil / icons.cog with inlined SVG constants (removed from CKEditor 5 core in v45)
- linkui.js: renames LinkUI._addActionsView() → _addToolbarView() (renamed in CKEditor 5 v43)
- js/build/drupalentity.js: rebuilt from the updated sources via `npm run build`

Why the rename matters: without it, editing the link on an already-linked entity embed throws `r._addActionsView is not a function` in CKEditor 5 v45+. !64 only fixed the icons and missed this.

Verified end-to-end against Drupal core's bundled CKEditor 5 v47.6.0.

Note on the red CI: every failing test errors with `UnmetDependenciesException: field.field.node.article.body (field.storage.node.body)` during entity_embed_test module install. The same failure pattern appears
on !64 and !65, so it pre-exists 8.x-1.x and is unrelated to the JS-only changes in !69. It looks like a test-fixture incompatibility with Drupal core ≥ 11.3, where the body field is no longer auto-created in
the testing setup. Worth tracking in a separate issue.