Problem/Motivation
In Drupal 10, CKEditor 4 will be replaced with CKEditor 5. It can be tested following the steps on https://www.drupal.org/docs/core-modules-and-themes/core-modules/ckedito...
Autofloat is not compatible with CKEditor 5:
CKEditor 5 only works with HTML-based text formats. The "Float images alternately left and right" (filter_autofloat) filter implies this text format is not HTML anymore.
Steps to reproduce
- Enable Autofloat.
- Enable CKEditor 5 module.
- Configure the Basic HTML format by enabling "Float images alternately left and right." and save.
- Configure it again by selecting "CKEditor 5" instead of "CKEditor": the above error message is displayed and the new configuration cannot be saved.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | Caecus-Eros-Genitus-Ut-Drupal-9.jpg | 321.07 KB | lolandese |
| #6 | Basic-HTML-Drupal-9.jpg | 451.04 KB | lolandese |
| #4 | ckeditor5_compatibility-3274048-4.patch | 537 bytes | lolandese |
Comments
Comment #2
lolandese commentedThanks for the link. Useful.
See more in Everything you need to know about CKEditor 5 integration for Drupal 9 - QED42 to see Ways of integrating CKEditor5.
Any patch, further guidance or help is appreciated.
Comment #3
lolandese commentedhttps://freelance-drupal.com/en/blog/testing-ckeditor-4-to-5-upgrade-path suggests to change in autofloat/src/Plugin/Filter/AutoFloat.php
with:
To roll a patch and test.
Comment #4
lolandese commentedAs suggested by #3.
Comment #6
lolandese commentedThe patch solves the issue. Tested following the steps as suggested by the OP in the issue description. See screenshots:
Comment #7
lolandese commentedA dev release is now available for Drupal 10:
https://www.drupal.org/project/autofloat/releases/2.x-dev