-
Hi plate community! I'm trying to build an editor that has nested blocks, where the node structure can go something like this :
I would like to render it somewhat like this :
And for structural reasons, this can't be done using indent tracking but rather it needs to be expressed in terms of having elements inside of other elements. However, the problem I'm running into is that I'd like to render the text field that I pass in as props as if it were inline children as plate does it with all my other plugins, but I don't know how to access the plates rendering system for that in my custom paragraph component. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I am also attempting to build something similar. Have you found any solution? |
Beta Was this translation helpful? Give feedback.
-
You can have nested blocks in Plate. Just create a plugin for each element. See the list plugin as reference: https://github.com/udecode/plate/blob/337162a75240987a052a5d2efc8c5d470ebb0c13/packages/list/src/createListPlugin.ts. The main work you need to do is in the components. |
Beta Was this translation helpful? Give feedback.
You can have nested blocks in Plate. Just create a plugin for each element. See the list plugin as reference: https://github.com/udecode/plate/blob/337162a75240987a052a5d2efc8c5d470ebb0c13/packages/list/src/createListPlugin.ts.
The main work you need to do is in the components.