Skip to content

Definition lists (<dl>) booted out of <ul>/<ol> and split the list in half #20067

@A-Kun

Description

@A-Kun

📝 Provide detailed reproduction steps (if any)

  1. Visit https://ckeditor.com/docs/ckeditor5/latest/features/source-editing/source-editing.html
  2. Toggle on Source mode
  3. Paste in the following HTML:
<ol>
  <li>
    <p><strong>Definitions</strong></p>
    <p>For the purposes of these conditions:</p>
    <dl>
      <dt>Title</dt>
      <dd>Definition</dd>
    </dl>
  </li>
  <li>Second item</li>
</ol>
  1. Toggle off and on Source mode

✔️ Expected result

What is the expected result of the above steps?

The HTML markup should remain unchanged.

❌ Actual result

What is the actual result of the above steps?

The HTML markup turns into the following:

<ol>
    <li class="ck-list-marker-bold" data-list-item-id="edc3a31effcba789ec11331363fb59695">
        <p>
            <strong>Definitions</strong>
        </p>
        <p>
            For the purposes of these conditions:
        </p>
    </li>
</ol>
<dl>
    <dt>
        <p>
            Title
        </p>
    </dt>
    <dd>
        <p>
            Definition
        </p>
    </dd>
</dl>
<ol>
    <li data-list-item-id="e02a1e36bf60efaa34cc81b95c90f1e38">
        Second item
    </li>
</ol>

📃 Other details

  • Browser: Firefox 140.9.0esr
  • OS: macOS 14.8.5
  • CKEditor version: 48.0.0

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

Metadata

Metadata

Assignees

No one assigned

    Labels

    package:html-supportsquad:coreIssue to be handled by the Core team.type:bugThis issue reports a buggy (incorrect) behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions