#107321Issue with table in CKEditor 5 when using dark mode
Description
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 2
History 3
-
Sébastien LeBlanc commented 08/22/25, 17:32
-
Garvin Hicking commented and changed category status
NewClosed 08/22/25, 18:48Hey Sebastien,
in v14 we’ve already better implemented dark/light mode in CKEditor 5 without the forced white background color. This is in place in earlier versions to be not breaking custom CSS rules of implementations.
Indeed for the application of custom contentCSS, TYPO3 employs a technique “CSS prefixing” which is performed via
Build/Sources/TypeScript/rte-ckeditor/css-prefixer.ts(in the css-prefix.js file after building). This takes care to transpose all CSS rules that would affect the “body” of an iframe to be applied to our custom web component.I’m closing the issue as requested, since you seem to have figured our a solution for you, right?
-
Sébastien LeBlanc commented and changed attached screenshot-2025-08-22-15-06-24.png 08/22/25, 19:11
The CKEditor in not white in dark-mode ! It was my custom CSS that this did.
Now by removing this the Foundation for Sites import, my background is dark, and I added forced a white background to my `
We import Foundation for Sites and it’s part of the default to set `html, body { backgroud-color: #fff }` but I didn’t understand because there is no `<html><body> tag, just a `<typo3-rte-ckeditor-ckeditor5>` customElement and somehow it coverts `html, body` to this selector `#data_tt_content__1519__bodytext_ckeditor5 .ck-content`.</typo3-rte-ckeditor-ckeditor5></body></html>`. No need to wait for Typo3 v14 as you can see in the attached screenshot.
Actually, something added `html, body { background-color: #fff }`, but I did not understand where it came from because CKEditor is not an iframe, but and customElement, so there is no `html` nor `body` tag in the component ! Something seem to be converting `html, body` property to a Constructed Stylesheet on the root `.ck` element.
I could not find how to close this issue, I can’t update the status, the dropdown only list “New” as an option