- Issue created by @handkerchief
It isn't the "Convert line breaks..." filter?
Is this specific to CKEditor?
- 🇦🇺Australia pameeela
Issue exists in CKE4 too, there is more info in 💬 CKEditor list adds unwanted P tag on restricted HTML Fixed
- 🇦🇺Australia pameeela
It is the
Convert line breaks into HTML (i.e. <br> and <p>)
filterFrom the other IS:
The problem goes away if the
Convert line breaks into HTML (i.e. <br> and <p>)
is unchecked but I expect that this isn't the expected behavior since it only affects list where the second list item is indented. I does not happen with the ordered lists.So should these be moved to filter.module and this one closed as a duplicate?
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
@pameela is correct.
filter_autop
should 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 👍😊 - Status changed to Fixed
almost 2 years ago 10:04am 1 February 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
To 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 → .
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
over 1 year ago 9:12am 28 February 2023 - 🇨🇭Switzerland handkerchief
Thx @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.
- 🇨🇭Switzerland handkerchief
Forget it, now it is solved. An additional template file was also responsible.
- 🇮🇳India vipul tulse
@handkerchief Can guide us which additional template file you changes/deleted
- 🇨🇭Switzerland 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.