Applying marks on empty nodes

Hi Marijn,

How can we apply marks on the nodes that are empty? ToggleMark() doesn’t seem to work, nor does dispatching transactions for adding marks.

I want to be able to initialize the node with some marks and keep those marks even when the user types something in the node.

That’s not really supported by ProseMirror’s mark model. toggleMark should work if you immediately type after toggling, but since marks are stored on inline content, they won’t get attached to block nodes. You could add attributes for this to your textblock nodes, and override styling for the first character that is typed into them with appendTransaction, but that’s somewhat involved.