sabbelasichon / typo3-rector

Rector for TYPO3
MIT License
228 stars 63 forks source link

Feature: #96874 - CKEditor 5 #3351

Closed sabbelasichon closed 1 year ago

sabbelasichon commented 1 year ago

Feature: #96874 - CKEditor 5

https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/12.0/Feature-96874-CKEditor5.html .. include:: /Includes.rst.txt

.. _feature-96874-1664488673:

============================ Feature: #96874 - CKEditor 5

See :issue:96874

Description

TYPO3 v12 ships with CKEditor 5, a Rich-Text Editor to edit fields where custom formatting for text with styling or links, or table formatting can be achieved.

CKEditor 5 is a completely rewritten and new editor compared to CKEditor 4, which was shipped since TYPO3 v8.

In general, most of the feature-set can be used in TYPO3 as before, with some details kept in mind when upgrading.

Please read the documentation on the conceptual changes between CKEditor 4 and CKEditor 5:

https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/migration-from-ckeditor-4.html

Impact

Next to plugins, which are not compatible anymore due to a completely different model architecture, some configuration options have been modified or do not apply anymore.

Most of the RTE configuration, which is done in TYPO3 in YAML preset files, is migrated, however it is recommended to rewrite any custom configuration files to become familiar with the CKEditor 5 API.

CSS Styling

CKEditor 5 does not load its editor in a specific iframe anymore. Especially for adding custom styling and fonts, all CSS declarations now need to be prefixed with ".ck-content". This can be achieved via SCSS, which TYPO3 natively handles for custom CSS styles. However, tag CSS declarations won't work, as the <body> tag does not apply to the editor HTML rendering anymore.

Configuration Options

Some options have been adapted, which are rarely used, but now documented here:

The following options are not needed anymore in CKEditor 5:

More migration options can be found here: https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/migration-from-ckeditor-4.html

Custom configuration to the WordCount plugin is automatically migrated from editor.config.wordcount to editor.config.wordCount:

CKEditor 5 integration is still experimental and subject to change to adapt to further needs until TYPO3 v12 LTS.

.. index:: RTE, ext:rte_ckeditor

helsner commented 1 year ago

We should check if we can provide a migration for this, as i heard from several different sources, that this change is big and painful for devs

helsner commented 1 year ago

i pushed my basic test setup which i created. this is not perfectly fitting and not tested at all. But maybe this will start at least things or serve as template

helsner commented 1 year ago

I talked to Benji Kott on the DevDays. He told me that the migration is not necessary as the Core targets (or already does) to provide a handler that can handle the config nonetheless. So no migration should be necessary as long as it fits the core requirements