How to update the editor with content loaded from URL? (with both happening on page load) #7195
Unanswered
vadimkantorov
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
(I'm a react-js newbie, so might be missing a standard pattern.)
I'd like to load some content from a URL on page's onload and then set it as the editor's contents (but so that the fetch not blocking the UI events).
So I've got two potentially slow processes happening (potentially in parallel) during page load:
How can I create a handler triggered when editor instance is loaded and available? https://lexical.dev/docs/react/plugins#lexicaleditorrefplugin can assign a variable to the editor instance when available, but it's not a Promise, right?
How can I get a promise for the editor instance being available?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions