The module's CSS is not being loaded when CKEditor 5 is used. This appears to be because the module uses hook_ckeditor_css_alter to add the CSS. CKEditor 5 does not load in an iframe so that hook is no longer used.

The CSS could instead now be loaded with attach_library in the Twig template.

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

PCate created an issue. See original summary.

luke.leber’s picture

Thanks for the bug report. I have not used ckeditor5 on any live client sites yet personally. Out of curiosity, if a media entity exists on page load is the style loaded then?

The library definitions are present in the field formatter's viewElements method, so I am wondering if the cke5 integration may not be bubbling things properly?

pcate’s picture

Out of curiosity, if a media entity exists on page load is the style loaded then?

Yes, on the node view page the styles are loaded fine. It is only on the node edit pages in CKEditor5 that the styles aren't loading.

My guess is the styles will need to be loaded with a CKEditor5 yaml plugin file: https://www.drupal.org/docs/drupal-apis/ckeditor-5-api/overview

luke.leber’s picture

Status: Active » Needs review

I've reached out to the experts in #ckeditor5 on slack with the approach in the merge request. Setting (optimistically) to NR :-).

  • Luke.Leber committed 701ae817 on 2.0.x
    Issue #3339708 by Luke.Leber, PCate: CSS is not loaded w/ CKEditor 5
    
luke.leber’s picture

Status: Needs review » Fixed

I'll be cutting a new release this weekend, thanks again!

Status: Fixed » Closed (fixed)

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