Problem/Motivation

When using CKEditor5 in Drupal 10.1 with a CSP that does not have 'unsafe-inline' in the style-src directive, CKEditor fails to load properly. (See attached screenshot).

As documented by CKEditor5, style-src requires unsafe-inline: https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/csp.html

Steps to reproduce

Proposed resolution

Issue fork csp-3386187

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

ChrisSnyder created an issue. See original summary.

chrissnyder’s picture

Issue summary: View changes
chrissnyder’s picture

Status: Active » Needs review
chrissnyder’s picture

chrissnyder’s picture

Related patch file.

gapple made their first commit to this issue’s fork.

gapple’s picture

Status: Needs review » Reviewed & tested by the community

Made some changes to make handling libraries that load editors via ajax a little more generic. Quickedit will be getting removed soon as part of dropping D9 support, but I think it still makes the pattern a little clearer for other modules that may need to do the same thing.

  • gapple committed f159366a on 8.x-1.x authored by ChrisSnyder
    Issue #3386187 by ChrisSnyder, gapple: CKEditor5 requires style-src '...
gapple’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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