Project

General

Profile

Actions

Bug #99327

closed

Epic #99669: CKEditor5 Collection

CKEditor: Multiple stylesheets in config.contentsCss are not working anymore

Added by Wittkiel Gruppe almost 2 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
Start date:
2022-12-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #100505: RTE loads CSS file path as string, but path comes as arrayClosed2023-04-06

Actions
Actions #1

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:

https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/content-styles.html#sharing-content-styles-between-frontend-and-backend

So as a workaround we use the rte styles in our backend.css now, the rte styles are separated via classname.

Actions #2

Updated by Benjamin Kott almost 2 years ago

  • Target version changed from 12.2 to 12 LTS
  • Parent task set to #99669
Actions #3

Updated by Benjamin Kott over 1 year ago

  • Status changed from New to Accepted
Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

Updated by Andreas Fernandez over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

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
Actions #12

Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF