CKEditor 5 removing \n on edit

Created on 18 July 2023, over 1 year ago
Updated 28 August 2023, about 1 year ago

Problem/Motivation

Hi,

I have website with quite a lot legacy content in database, where insted of <p> or <br> there is a lot of new line characters (\n).
I'm migrating this site from D7 to D9.
On D7 with CKEditor 4 it works perfectly fine: articles looks great on front and in editor.
On D9 with CKEditor 5, front looks great after I turned "Convert new lines... to <br> and <p>" filter in text format configuration. But it doesn't look good in CKEditor - it removes all \n from the text, which leads to paragraphs being glued together.
What is interesting, pasting such content via editor adds beatiful <p> and <br>. But when content is already there - \n is just removed and not replaced with HTML.

Any sugestions if I'm missing something in the configuration? Or how this can be solved?

P.S. I was also checking module https://www.drupal.org/project/wysiwyg_linebreaks - but it doesn't support CKEditor 5

💬 Support request
Status

Fixed

Version

9.5

Component
CKEditor 5 

Last updated about 14 hours ago

Created by

🇵🇱Poland besek

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024