Problem/Motivation
The ckeditor_stylesheets property in a theme's info.yml makes it possible to CKEditor 4 contents with CSS from the front-end theme.
ui_suite_dsfr is currently using this key:
ckeditor_stylesheets:
- dist/dsfr.min.css
To make it works with CKEditor 5, there are 2 changes:
- the key is now ckeditor5-stylesheets
- those styles need to be written differently since CKEditor 5 is not loaded in an iframe, with a .ck-content selector prefix
We keep both ckeditor 4 and ckeditor 5 while Drupal 9 is till supported (until
Remaining tasks
- Decide how much of this CSS should be avaiable for CKEditor 5. The full dsfr.min.css seems overkill.
- Find a way of automatically prefixing all those selectors.
Comments
Comment #2
pdureau commentedComment #3
pdureau commentedDrupal 9 is not supported anymore (November 2023), so let's use
ckeditor5-stylesheetsonly.Comment #4
pdureau commentedComment #5
pdureau commentedComment #6
pdureau commentedComment #7
pdureau commentedWaitign for this to be ready: #3453784: Stylesheet generator + CKE5 usage
Comment #8
pdureau commentedComment #9
pdureau commentedNot needed any more because UI Styles 1.10 was shipped with this feature: https://www.drupal.org/project/ui_styles/releases/8.x-1.10