Adding a child to a node #5707
Replies: 1 comment
-
So I think I'm supposed to use
All of the above replace the text that is already written inside the codeblock. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm implementing the code highlighting example (https://www.slatejs.org/examples/code-highlighting).
Everything works well, except whenever I try to insert a new line when I'm writing within the code block it creates a paragraph after the code block. My Slate object looks like this:
My assumption was that I could override
editor.inserBreak
to change the behavior, so I came up with this code:Given the Slate object above, trying to add a new line at the end of the existing text attempts to insert:
But the newline isn't inserted. I also tried doing:
What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions