Where is the code that unindents an empty list item on enter? #2611
Answered
by
12joan
OliverWales
asked this question in
Q&A
-
In the list playground, pressing enter when in an empty list item reduces the indent level by one until it is not indented, at which point it resets to a paragraph node. I'd like to achieve something similar in my own custom list plugin, but I'm having trouble finding which bit of the code implements this behaviour. Can anyone point me in the right direction? |
Beta Was this translation helpful? Give feedback.
Answered by
12joan
Sep 11, 2023
Replies: 1 comment 1 reply
-
I'm pretty sure it's this line in insertBreakList |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
OliverWales
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm pretty sure it's this line in insertBreakList
https://github.com/udecode/plate/blob/main/packages/list/src/insertBreakList.ts#L33