Hello friends, I love prosemirror.
I would like to have a button in the tooltip that changes the block type similar to the photo:
The problem: I can’t find a method to switch from a list type block to other blocks and vice versa, I understand that the problem is that lists can be nested.
Question: How can I deal with the problem?
Notes:
- An alternative would be that when a user chooses the target block type, the application could change the current block type to a paragraph block (removing the indentations and others blocks types like h2), of the actual selection and then change to the block type the user chose. Is there a method to remove all indentations from a list? or How can I detect the number of indentations, to apply sinkListItem “n” times?
- I see that tiptap can switch block types if the blocks in the selection are of the same type
Thanks for the attention