- Issue created by @besek
- 🇫🇮Finland lauriii Finland
There could be multiple ways to approach this but probably all of them require you to migrate from
\nto HTML.One solution would be to replace
\nwith<br>from the existing content. This could be done for example inhook_entity_load, when editing content. This way when the content is re-saved, it would have the newlines converted. - Status changed to Postponed: needs info
over 2 years ago 1:02pm 28 July 2023 - 🇵🇱Poland besek
Ok, this is actually correct. I thought it was working in Drupal 7 by default, but I've realised that I was actually using module https://www.drupal.org/project/wysiwyg_linebreaks → (currently supporting D9, but not CKEditor 5)
Thanks for explanation!
- Status changed to Fixed
about 2 years ago 3:35pm 28 August 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
3 months ago 8:51pm 3 August 2025 - 🇩🇰Denmark ressa Copenhagen
I also saw something similar in a Drupal 7 site migrated to Drupal 10 (originally Drupal 5), where line breaks were lost as soon as I switched "Text editor" to "CKEditor 5" (the original filter), or just to a filter using CKEditor -- all lines ended up in one long row.
After finding this issue, I tried Wysiwyg Linebreaks → which got CKEditor 5 support in September 2024 → . It works like a charm, and all line breaks are wrapped beautifully in
<p>tags -- thanks for helping out with CKEditor 5 support in ✨ CKEditor 5 Fixed @besek :)