Hello! I’m trying to understand how I can get a normal cursor when I have custom components in my ProseMirror editor (I’m using TipTap). I originally posted this on their Github, but I imagine it’s actually something I’m not understanding in ProseMirror’s Gapcursor. This is the fiddle I’ve been working with, and here’s a video showing my issue. Basically, I want the cursor to show vertically after my components, instead of horizontally floating above. Thanks for any assistance!
That’s not something prosemirror-gapcursor can do. Your best way forward would be fork it and make it render gap cursors differently.
Thanks for the response! That is basically what I’ve done here. It’s not perfect, and it definitely has issues with keyboard navigation, but I might be able to overcome that by listening to the focus event or something.
I was trying to do something like this, where I pad the components with a paragraph element, but when I did that, the anchor position eventually didn’t make sense why it was so high… like at the end of this video, it reports the number is 19 (disregarding my current cursor position), and at most, there were 15 elements, so I’m not sure how it came up with 19. If I click around, it eventually resets to 4, but I had to abandon this approach due to the cursor position.