Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
loic-bellinger opened this issue Feb 28, 2024 · 2 comments · May be fixed by #2678
Open

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

loic-bellinger opened this issue Feb 28, 2024 · 2 comments · May be fixed by #2678

Comments

@loic-bellinger
Copy link

loic-bellinger commented Feb 28, 2024

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();
@brettearle
Copy link

Gday, can i take this on?

@neSpecc
Copy link
Member

neSpecc commented Apr 5, 2024

Gday, can i take this on?

Hello. Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants