- Issue created by @Jingles1987
- 🇮🇳India sakthi_dev
@jingles1987, It's mentioned in the Filter document as "Lines and paragraphs are automatically recognized. The
line break,paragraph and
close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple of blank lines."
- Status changed to Postponed: needs info
7 months ago 1:54pm 18 April 2024 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
I don't understand what this is asking.
In every rich text editor I know:
return
means "new paragraph"shift+return
means "new line in the current paragraph"
I just tried it, and it's the same in CKEditor 5. This is also true in Google Docs, Microsoft Word, Slack, and more.
So … what is this asking? 🫣
Hi @Wim Leers, just for your information.
- I think this issue looks the same as the forum topic of https://www.drupal.org/forum/support/post-installation/2022-02-24/ckeditor-inserting-extra-line-breaks → .- API and contribute modules in order to use
tag for line break by pressing Enter key;
For CKEditor 4, there are CKEditor 4's API ("enterMode" config option) and a contribute module like "CKEditor custom config" ( https://www.drupal.org/project/ckeditor_config → ) to specify the config option ("enterMode = 2").
For CKEditor 5, there is CKEditor 5's API and event (https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/api-and-events.html#using-events), but no contribute module at this moment.- I think there are two disadvantages in using
tags for line break;
1. Line hight looks double in rich text field (e.g. CKEditor 5 field) -> This can be solved by CSS "p { margin: 0; }" as @gisle mentioned at the forum topic.
2. An empty line is added after every line when copying text from rich text field and pasting to plain text field (including plain text editor like Windows Notepad). -> I have no idea to solve this. I guess this is copying and pasting specification of Windows.