codex-team / codex-team/editor.js

renderFromHTML not working with nested list

Open
#2,884 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

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

```

...

editor.blocks.renderFromHTML(`



  • David 1

    • Bulletpoint 1.A

    • Bulletpoint 1.B



  • Erica 2

    • Bulletpoint 2.A

    • Bulletpoint 2.B




`);
```

Screenshots:

Current display with bug
![image](https://github.com/user-attachments/assets/0ee52c79-e49e-47ef-a553-c430254af4c7)

Expected display
![image](https://github.com/user-attachments/assets/4f5aeb2e-da6b-4321-8029-5c1700998314)

Device, Browser, OS: Chrome, Windows 11

Editor.js version: latest

Plugins you use with their versions: list @latest

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.