I would like my editor to support expanding/collapsing block content. I’ve got a structured document schema where the document is composed of sections, and each section is composed of a title followed by the usual cast of block players. I’d like to let the user collapse a section to only show the title, if they wanted. I don’t want the “expanded/collapsed” state to be part of the document since I am allowing collaboration and am willing to let this state be non-persistent for the time being. I have attempted this with a node view, but I can’t seem to convince the editor view instance that it needs to update.
After thinking about the problem more, it seems like a plugin is the right tact, but I’m not entirely sure how just yet. I’m just looking for confirmation that a) this is possible with Prosemirror and b) decorations are the way to go. (I’m still riding around in training wheels with this library…)