I'm making a storytelling application that uses ProseMirror with a custom mark. This mark has one attribute,
targetCharacters, which contains a list of characters the marked text refers to. So simply toggling it on and off doesn't really make much sense: sometimes you want to add or remove a character from the list, ie. update the value of the
I'm not sure what the most sensible way to do this is. My first attempt was to remove the mark, then re-add it if there is at least one character left in the list (I have a special UI to choose characters from a list). But the problem is, there is no
tr.removeMark) and I cannot call
toggleMark twice in the
openPrompt (I get an
Applying a mismatched transaction)...
Any ideas or pointers?