editor.js
editor.js copied to clipboard
renderFromHTML not working with nested list
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
Expected display
Device, Browser, OS: Chrome, Windows 11
Editor.js version: latest
Plugins you use with their versions: list @latest