CKEditor removing \n on edit

Created on 18 July 2023, over 2 years ago

Problem/Motivation

Hi,

I have website with quite a lot legacy content in database, where insted of

or
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
and

" 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

and
. 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

Active

Version

9.5

Component
CKEditor 5 

Last updated about 2 months 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