Ensuring the last node in the editor is a paragraph #5713
Unanswered
leo-petrucci
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
Uh oh!
There was an error while loading. Please reload this page.
-
I'm having trouble with that seems to be a very simple thing to implement.
In my editor I have voids, these voids are not editable, so it's quite difficult to add a new node after them. Ideally I'd like if there was always a paragraph as the last node in my editor.
My initial thought was to use normalization for this.
The above code does work if I've just added a node to the editor, but it doesn't run on the editor's first render.
I even tried adding
But the normalize function just won't run.
What's my best option here?
Beta Was this translation helpful? Give feedback.
All reactions