codex-team/editor.js

this.Editor.BlockManager.clear() should be awaited in renderFromHTML()

Open

#2,641 建立於 2024年2月28日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)TypeScript (26,602 star) (1,985 fork)batch import
good first issue

描述

I believe this.Editor.BlockManager.clear() should be awaited in renderFromHTML() to prevent errors.

The following example highlights the issue: data.blocks will often be empty as a result of not awaiting clear().

await $editorApi.blocks.renderFromHTML(html);
const data = await $editorApi.saver.save();

貢獻者指南