renderFromHTML on ready causing undefined error
Question
I have HTML saved on database and have torender it for the EditorJS in cases of edit, however running to undefined when trying to use renderFromHTML. Any way to solve this?
Context
Found out there's renderFromHTML and trying to use it on ready:
onReady: () => { editEditor.blocks.renderFromHTML("htmlContent}");},
This however leads to:
editorjs@latest:6 Uncaught TypeError: Cannot read properties of undefined (reading 'holder')
editorjs@latest:6 Uncaught TypeError: Cannot read properties of undefined (reading 'tool')
when editor div is clicked.
I tried to add isready inside document ready (running jquery) outside of the editor init itself, but this didn't help. Even tried to add timeout, but that did not help either.
Is there a way to do this in javascript / jquery environment? Running this on Laravel based project with jquery.
I'm seeing the same bug. Commenting out the renderFromHTML makes it work again
Same here. Had to do if (content.trim()) { ...renderFromHTML(content) }
im getting the same issue with latest version