Closed (fixed)
Project:
Drupal core
Version:
9.5.x-dev
Component:
ckeditor5.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2023 at 18:21 UTC
Updated:
27 Oct 2023 at 14:43 UTC
Jump to comment: Most recent



Comments
Comment #2
handkerchiefComment #3
cilefen commentedIt isn't the "Convert line breaks..." filter?
Is this specific to CKEditor?
Comment #4
pameeela commentedIssue exists in CKE4 too, there is more info in #3199643: CKEditor list adds unwanted P tag on restricted HTML
Comment #5
cilefen commentedSo it is CKEditor and not a Drupal output filter, doing this?
Comment #6
pameeela commentedIt is the
Convert line breaks into HTML (i.e. <br> and <p>)filterFrom the other IS:
So should these be moved to filter.module and this one closed as a duplicate?
Comment #7
wim leers@pameela is correct.
filter_autopshould not be used with neither CKEditor 4 nor 5.CKEditor 5 actually used to explicitly disallow this filter plugin from being enabled. But because so many legacy sites (especially upgraded from Drupal 5, 6 and 7) were using CKEditor 4 in combination with
filter_autop, it was decided in #3273312: Upgrading from CKEditor 4 for a text format that has FilterInterface::TYPE_MARKUP_LANGUAGE filters enabled to allow this because no real problems are caused.What you're reporting here (the unwanted
<p>) tags is the remaining problem that is being caused.Just disable
filter_autop(label in the UI: ) and the problem goes away 👍😊Comment #8
wim leersComment #9
wim leersTo help make this better in the future, I propose we do #3227948-11: Discourage FilterInterface::TYPE_MARKUP_LANGUAGE filters from begin enabled when using CKEditor 5.
Comment #11
handkerchiefThx @Wim Leers for all your support. Unfortunately, disabling the option "Convert line breaks..." does not help, the additional p tags still appear. Even after I have entered the texts afterwards quite fresh. Am I missing something? I have always cleared the cache several times.
I'm on Drupal 10.0.3 now.
Comment #12
handkerchiefForget it, now it is solved. An additional template file was also responsible.
Comment #13
vipul tulse commented@handkerchief Can guide us which additional template file you changes/deleted
Comment #14
handkerchief@vipul tulse Sure. It was additional a custom field template from my own theme. The custom template has additionally added p tags. So it was a mix. First, it worked with the fixes mentioned in this issue, then in another project, my own template was the reason.