editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

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

Open loic-bellinger opened this issue 1 year ago • 2 comments

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();

loic-bellinger avatar Feb 28 '24 13:02 loic-bellinger

Gday, can i take this on?

brettearle avatar Apr 05 '24 09:04 brettearle

Gday, can i take this on?

Hello. Sure.

neSpecc avatar Apr 05 '24 10:04 neSpecc