-
I would like to implement my first plugin, I would like to create a block element that can contains other block elements ANd when I press Enter (insert a break) new paragraph should remain inside parent block (like Code-block does). Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
dylans
May 31, 2022
Replies: 1 comment 1 reply
-
You’d need to extend insertBreak. code-block does that inside https://github.com/udecode/plate/blob/main/packages/nodes/code-block/src/withCodeBlock.ts |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
miquik
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You’d need to extend insertBreak. code-block does that inside https://github.com/udecode/plate/blob/main/packages/nodes/code-block/src/withCodeBlock.ts