Bug #99327
closedEpic #99669: CKEditor5 Collection
CKEditor: Multiple stylesheets in config.contentsCss are not working anymore
100%
Description
In TYPO3 12.0.0 and 12.1.0 it's not possible anymore to include multiple stylesheets in editor.config.contentsCss for CKEditor as described here:
contentsCss : String | Array https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-contentsCss
Working example in TYPO3 11:
contentsCss: [ "EXT:rte_ckeditor/Resources/Public/Css/contents.css", "EXT:myext/Resources/Public/Css/lib.css", "EXT:myext/Resources/Public/Css/custom.css" ]
I know, now it's CKEditor 5, but we need it for example to include some CSS of a library and some custom CSS-files and now it's not possible anymore and a breaking change. I think this lines and following are wrong:
$styleSrc = (string)($ckeditorConfiguration['options']['contentsCss'] ?? ''); https://github.com/TYPO3/typo3/blob/v12.1.0/typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php#L130
Updated by Michael Kasten almost 2 years ago
Confirmed, the handling inside TYPO3 differs from the orginal behaviour, it should be possible to continue using the old configuration like:
config.contentsCss = [ '/css/mysitestyles.css', '/css/anotherfile.css' ];
But this is the ckeditor4 Setting, TYPO3 V12 uses now the ckeditor5. Using customstyles is different here:
So as a workaround we use the rte styles in our backend.css now, the rte styles are separated via classname.
Updated by Benjamin Kott almost 2 years ago
- Target version changed from 12.2 to 12 LTS
- Parent task set to #99669
Updated by Gerrit Code Review over 1 year ago
- Status changed from Accepted to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78592
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78592
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78592
Updated by Gerrit Code Review over 1 year ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78592
Updated by Gerrit Code Review over 1 year ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78592
Updated by Gerrit Code Review over 1 year ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78592
Updated by Andreas Fernandez over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset efd412ebaaf99b707a04ab987c7f6e13cd3425c0.
Updated by Oliver Hader over 1 year ago
- Related to Bug #100505: RTE loads CSS file path as string, but path comes as array added