Div into <p> but outside of <p> after saving the content

Created on 27 February 2024, 4 months ago
Updated 13 May 2024, about 2 months ago

Problem/Motivation

When I created a div, it was created inside of <p></p> (which I think it is okay πŸ› Ckeditor 5 is wrapping html tags inside p tag Active , because in CK5 everything is now in into <p>). Then, when I save the content, it refactored the content inside the WYSIWYG, and then the div is not inside of the <p>, it's outside. I have a style to apply on divs, but after creating them, I'm not able to select the div on the editor, because inside of <p>; therefore, the styles dropdown is disabled (it can't detect my div). To solve this problem, you need to save, and edit again to be able to see the styles for the div, because now, for some reason, the div is outside the <p>.

Steps to reproduce

1. Create a div using the module in CK5:

2. If click on source after creating it, you will see your div into a <p>.

3. Save the content and inspect the HTML. Magically it is now outside the <p> and you will see an empty <p> above your div.

It may be related with the following issues:

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain javitan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024