Review main Merged

78762[BUGFIX] Transparently add Link Browser classes to ckeditor

Andreas Kienast CR +2 V +2 Expert +1325 −955 updated 04/24/23, 19:32

Commit message

There are currently two ways to configure link classes in ckeditor:

* `config.stylesSet`
* `buttons.link.properties.class.allowedClasses`

The latter configuration is required for use in the Link Browser. If
the configured classes are missing in `config.stylesSet`, CKEditor's
behavior is undefined. In most cases, the class is dropped upon save.

Since this is a common misconfiguration, `CKEditor5Migrator` now
registers said Link Browser classes as styles in CKEditor.

To achieve this, `CKEditor5Migrator` now receives the *full* RTE
configuration, as Link Browser configuration happens outside
CKEditor domain `editor.config`.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1417

  1. Andreas Kienast uploaded patch set 1 04/20/23, 09:36

  2. core-ci voted on patch set 1 V +1 04/20/23, 09:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40950

  3. Stefan Froemken commented on patch set 1 04/24/23, 06:26

    CKEditor5Migrator.php:223

    Can we use ??= here

    CKEditor5Migrator.php:707

    negate and early return. That way we can save one indent
  4. Stefan Froemken commented on patch set 1 04/24/23, 06:29

    missing "is"
  5. Andreas Kienast commented on patch set 1 04/24/23, 06:30

    Reply

    Ack

    CKEditor5Migrator.php:223 Reply

    We can, but I wanted to change the absolute minimum necessary stuff only to keep the patch in a reviewable state.

    CKEditor5Migrator.php:707 Reply

    Ack
  6. Andreas Kienast uploaded patch set 2 V +1 04/24/23, 06:32

  7. core-ci voted on patch set 2 V +1 04/24/23, 06:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41115

  8. Stefan Froemken voted on patch set 2 CR +1 04/24/23, 07:28

  9. Benni Mack commented on patch set 2 V +1 CR +1 04/24/23, 14:33

    good solution
  10. Oli Bartsch voted on patch set 2 V +1 CR +1 04/24/23, 16:08

  11. Oli Bartsch commented on patch set 2 V 0 CR -1 04/24/23, 16:17

    On it
  12. Oli Bartsch uploaded patch set 3 CR +1 V +1 04/24/23, 16:29

  13. Oli Bartsch uploaded patch set 4 04/24/23, 16:31

  14. core-ci voted on patch set 4 V +1 04/24/23, 16:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41180

  15. Benni Mack voted on patch set 4 V +1 CR +1 04/24/23, 18:40

  16. Oli Bartsch commented on patch set 4 V +2 CR +2 04/24/23, 19:32

    CKEditor5Migrator.php:223 Reply

    Done
  17. Oli Bartsch merged patch set 5 04/24/23, 19:32