My editor has a “block type” dropdown, with ‘Normal text’, ‘Heading 1’, ‘preformatted’ etc. I want to display the type of the “current” block.
For spans I was able to get that easily with ProseMirror.activeMarks, however I can’t find a way to get this information for blocks.
I tried with nodeAt on the document, but I’m getting the child node (a TextNode) and I can’t find a way to go up to the parent.
Any idea how I can get that info?