Problem/Motivation
Core themes classy, umami, and claro contain an entry in ckeditor_stylesheets called media-embed-error.css to format errors when embedding
This will need consideration for each to port to CKEditor 5, but it makes more sense to add this styling centrally within CKEditor 5.
Steps to reproduce
The effects of the styling can be seen by embedding a media item using CKEditor GUI then editing the source to change the UUID of the media item to something invalid.
Proposed resolution
Remaining tasks
All the things.
User interface changes
None
API changes
None
Data model changes
None
Comments
Comment #2
eli-tComment #3
wim leersI would love this. But … can we? Why was this originally done in Classy and not in the Media module? Isn't that the policy?
Note that the
media_mediaplugin that's currently listed incore/modules/ckeditor5/ckeditor5.ckeditor5.ymlwill eventually be moved tocore/modules/media/media.ckeditor5.yml— we can't do that yet because it's not yet stable. But it's already been marked as being provided by themediamodule, in anticipation of that.So I think that would mean that this issue would need to move it to the Media module, not the CKEditor 5 module?
Background
The following issues introduced these:
Comment #4
lauriiiI think we should move this stylesheet in CKEditor 5 from the individual themes to the module. The reason it was part of the themes for CKEditor 4 was at least partially that CKEditor 4 shipped with minimal styling and the individual themes were responsible for adding styles using
ckeditor_stylesheets. CKEditor 5 on the other hand is shipping with an opinionated design and therefore it would be good to style the media library error in that same design language and ship it as part of the module.I think ideally we would also mark the CSS for this as internal, and not copy it to the Stable theme so that it could be changed later on.
Comment #5
wim leers#4: So does that mean that you're saying the CKEditor 5 module should continue to own the CKEditor 5 Drupal media integration? Because otherwise it'd be hard to defend this
@internalCSS file?Comment #6
lauriiiI'm wondering if we should provide generic error styles in the CKEditor 5 module. Something like
.ck-widget--error. That could be then used in the Media module. Thoughts on that?Comment #7
wim leersThat works for me for sure :) Though I'm not sure how that would help with the template being used?
Comment #8
wim leersOhhhhhhhhhhhhhhhhhhh mea culpa
I thought it was
media-embed-error.html.twigthat this was referring to — but this issue indeed seems to be only referring to the CSS associated with that template. @Eli-T, can you confirm? 🙏Comment #9
eli-tYes, that was my intention for this issue.
Comment #10
wim leersOh, perfect!
Comment #11
wim leersAFAICT this has been fully addressed by #3271094: Move Media CKEditor 4 integration into CKEditor. It's now 100% owned by the
mediamodule, not the CKEditor 4/5 modules 👍