Ckeditor 5 is wrapping html tags inside p tag

Created on 1 December 2023, 7 months ago
Updated 5 May 2024, about 2 months ago

After migration from D9 to D10,different html tags are enclosing in p tag. In D9 we were using ckeditor 4 and now in D10 core ckeditor5 is used. Is there any way to resolve it?
Ckeditor 4 source code:

<form>
        <h1 class="hcHeading">
            Can you <span>relate?</span>
        </h1>       
            <label>label</label>       
    </form>

Ckeditor 5 souce code : label tag inside form tag is wrapped in p tag

<form>
        <h1 class="hcHeading">
            Can you <span>relate?</span>
        </h1>
        <p>
            <label>label</label>
        </p>
    </form>

Ckeditor 4 source code :

<div class="dropdown">
   
        <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
            Dropdown button
          </button>
   
    <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
        <li>
            <a class="dropdown-item" href="#">Action</a>
        </li>
        <li>
            <a class="dropdown-item" href="#">Another action</a>
        </li>
        <li>
            <a class="dropdown-item" href="#">Something else here</a>
        </li>
    </ul>
</div>

Ckeditor 5 code: button is wrapped inside <p> tag

<div class="dropdown">
    <p>
        <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
            Dropdown button
          </button>
    </p>
    <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
        <li>
            <a class="dropdown-item" href="#">Action</a>
        </li>
        <li>
            <a class="dropdown-item" href="#">Another action</a>
        </li>
        <li>
            <a class="dropdown-item" href="#">Something else here</a>
        </li>
    </ul>
</div>
🐛 Bug report
Status

Active

Version

11.0 🔥

Component
CKEditor 5 

Last updated about 2 hours ago

Created by

🇮🇳India Drupalite1411

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024