Ckeditor 5 automatically changes the html structure in Source editing mode

Created on 21 May 2024, 6 months ago
Updated 3 July 2024, 5 months ago

Problem/Motivation

Ckeditor 5 automatically changes the html structure in Source editing mode

original html:

<div class="__tile-outer">
        <a href="https://www.google.com/">
<div class="__tile-inner">
                <img class="__tile-img-content" src="https://cdn.boatinternational.com/convert/files/2024/05/3a4aa060-1687-11ef-b53e-e5fd81c40b7c-rossinavi-seawolf-x-5.jpg/r%5Bwidth%5D=1920&r%5Bheight%5D=1080/3a4aa060-1687-11ef-b53e-e5fd81c40b7c-rossinavi-seawolf-x-5.webp">
<div class="__tile-title">Testing</div>
</div>
<p>        </p></a>
    </div>

Ckeditor is converting it to:

<div class="__tile-outer">
        <div class="__tile-inner">
            <p>
                <a href="https://www.google.com/"></a>
            </p>
            <div class="__tile-title">
                <a href="https://cdn.boatinternational.com/convert/files/2024/05/3a4aa060-1687-11ef-b53e-e5fd81c40b7c-rossinavi-seawolf-x-5.jpg/r%5Bwidth%5D=1920&r%5Bheight%5D=1080/3a4aa060-1687-11ef-b53e-e5fd81c40b7c-rossinavi-seawolf-x-5.webp">Testing</a>
            </div>
        </div>
    </div>

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
CKEditor 5 

Last updated about 11 hours ago

Created by

🇮🇳India omsingh89

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

Comments & Activities

Production build 0.71.5 2024