I understand that custom Selection types are supported, but it’s not clear to me how to actually make use of those outside of very specific cases because so much relies on TextSelection
internally.
I noticed the code mentions that custom bookmarks can make custom selections play nicely with prosemirror-history
(prosemirror-state/src/selection.ts at master · ProseMirror/prosemirror-state · GitHub) but it’s not clear to me how we’d actually make use of the custom selection and its bookmarks.
If I make and use CustomSelection
, I noticed when I undo that the selection is back to TextSelection
. I guess I can’t say with certainty nothing else is interfering, but I wonder if there’s something I’m overlooking?
I was surprised not to see custom selections discussed very much despite the extensive documentation and discussion around ProseMirror.