Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renderFromHTML not working with nested list #2884

Open
thecliffparis opened this issue Dec 2, 2024 · 0 comments
Open

renderFromHTML not working with nested list #2884

thecliffparis opened this issue Dec 2, 2024 · 0 comments
Labels

Comments

@thecliffparis
Copy link

Hi,

renderFromHTML duplicates lists content in the editor.

Here is an example to reproduce the error.
I hope this helps to fix the bug.

Codepen : https://codepen.io/thecliffparis/pen/mybbwGq

<script src="https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/@editorjs/list@latest"></script>
...

editor.blocks.renderFromHTML(`<div>  
<ul>
    <li>David 1
      <ul>
        <li>Bulletpoint 1.A</li>
        <li>Bulletpoint 1.B</li>
      </ul>
    </li>
    <li>Erica 2
      <ul>
        <li>Bulletpoint 2.A</li>
        <li>Bulletpoint 2.B</li>
      </ul>
    </li>
  </ul>
</div>`);

Screenshots:

Current display with bug
image

Expected display
image

Device, Browser, OS: Chrome, Windows 11

Editor.js version: latest

Plugins you use with their versions: list @latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant