editor.js/src
narpat-ps df7d3a7883
resolve "Can't find a Block to remove" error in renderFromHTML (#2941)
* fix(blocks):Error occurred when calling renderFromHTML: Can't find a Block to remove.

* fix: resolve "Can't find a Block to remove" error in renderFromHTML

- Make renderFromHTML async and await BlockManager.clear() to prevent race condition
- Change removeBlock order: remove from array before destroy to prevent index invalidation
- Fix clear() method to copy blocks array before iteration to avoid modification during loop

Fixes issue where renderFromHTML would fail with "Can't find a Block to remove" error
due to concurrent block removal operations and array modification during iteration.

Resolves #2518
2025-09-06 16:20:08 +03:00
..
components resolve "Can't find a Block to remove" error in renderFromHTML (#2941) 2025-09-06 16:20:08 +03:00
styles feat(ui): placeholders updated (#2758) 2024-07-04 14:55:01 +03:00
tools/stub fix(types): tools export types added (#2802) 2024-08-09 18:04:57 +03:00
types-internal feat(inline-tools): Inline tools rendered as popover (#2718) 2024-06-30 22:27:37 +03:00
codex.ts fix(types): tools export types added (#2802) 2024-08-09 18:04:57 +03:00
env.d.ts fix(inline-toolbar): appearance logic improved (#2550) 2023-12-09 02:05:27 +03:00