Ability to configure schema rules
oyeanuj opened this issue · 2 comments
Hi @SamyPesse @Soreine! I ran into a small question while using this excellent plugin. The schema makes an assumption that the child of the list_item
is a paragraph
node (and thus also, text as the child node of that).
In my case, the editor has images, etc, and it would be ideal to be able to have the child nodes of list_item
be configurable to user-specified list of block elements. Is that possible right now, or easy to do with the library?
The schema only impose that list_item
contains blocks (node.kind === 'block'
). You cannot use list_items
as direct container of inlines
or texts
. I think you should be able to do what you want. I'll be happy to answer further if you give more detail.
oh, I see! Thank you for the clarification!
I got the impression from the Readme that the 'rules' included the block type being a paragraph. I can make a quick Readme PR incase anyone else wonders.