- Issue created by @finex
- Status changed to Closed: works as designed
almost 2 years ago 11:17am 16 March 2023 - 🇵🇱Poland Krzysztof Domański Poland
For semantic reasons, deleting paragraphs is not recommended. A semantic element clearly describes its meaning to the browser.
If you need to get rid of
<p>
tags add them to core filterLimit allowed HTML tag and correct faulty HTML
. - Status changed to Closed: won't fix
almost 2 years ago 11:21am 16 March 2023 - 🇬🇧United Kingdom iancawthorne
If you need to get rid of
tags add them to core filter Limit allowed HTML tag and correct faulty HTML.
It is not possible to remove
tags from the core filter Limit allowed HTML tags and correct faulty HTML in ckeditor 5.
I have the same use case as the opening post where there is a heading that requires formatting with bold or italic, but the text format should not allow heading or paragraph tags. It looks like this patch does exactly as required.
I would add a +1 for this ticket being re opened.
- 🇦🇺Australia sime Melbourne
It's not possible to limit
<p>
tags as that field is controlled now. This is my toolbar which has no reference to block level elements.[Bold][Italic][Link]
This is the forced allowed tags for the above configuration.
<br> <p> <strong> <em> <a href data-entity-type data-entity-uuid data-entity-substitution>
- Status changed to Active
over 1 year ago 10:26am 13 July 2023 - 🇦🇺Australia sime Melbourne
It's also kinda of a pain for local dev and this doesn't work with twig debug on.
{{ content.field_html|render|replace({'<p>': '','</p>': ''})|raw }}
- 🇦🇺Australia sime Melbourne
This is probably easiest solution based on contrib (no D10 release at this point)
https://www.drupal.org/project/customfilter → - 🇮🇹Italy finex
I still think my initial patch it's the way. Just add a better description like "This option will not enclose the text with a
element, please make sure that the template will enclose the content using an appropriate tag." :-)
- Status changed to Closed: won't fix
over 1 year ago 2:20am 15 July 2023 - 🇦🇺Australia sime Melbourne
I was confused and thought this was an issue in Drupal core, sorry about that - i wouldn't have reopened. For the record also has upstream attention.
https://github.com/ckeditor/ckeditor5/issues/1537#issuecomment-1627542561
- 🇮🇹Italy finex
Thanks for suggesting the Custom Filter module (now it's also available on D10) but I still prefer this lightweight module. Even if it's a "won't fix" I've updated the patch :-)