Problem/Motivation

After Drupal has updated CKEditor over in #3523018: Update CKEditor 5 to 45.2.0 an error appears when trying to click on an embedded content widget inside the editor. Following error message is being thrown in console:

Uncaught CKEditorError: Cannot read properties of undefined (reading 'pencil')

The problem is that icon: e.icons.pencil inside the JavaScript is invalid and the icon is not available.

Steps to reproduce

Update to latest Drupal version and try to edit an embedded content, also no pencil icon is shown:

Proposed resolution

We need to install @ckeditor/ckeditor5-icons package and import icon like import { IconPencil } from '@ckeditor/ckeditor5-icons'; then.

After doing this it looks like this again:

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

yannickoo created an issue. See original summary.

yannickoo’s picture

Status: Active » Needs review
loon’s picture

Status: Needs review » Reviewed & tested by the community

RTC

mauro_’s picture

StatusFileSize
new16.02 KB

Confirming this MR solves the issue for me. Issue occurred after upgrading from ckeditor5_embedded_content to this one. Attached a patch from MR for those looking to solve.

jaydee1818’s picture

The patch also works for me.

  • nuez committed c2117770 on 2.0.x
    feat: #3533539 Uncaught CKEditorError: Cannot read properties of...
nuez’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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