I’m running into some UX issue when the last node in the document is not a text node.
For example, in http://prosemirror.net/ - create a ‘horizontal rule’ as the last element in your document. Now try to add a new paragraph below. It’s quite tricky to get the cursor to land after that element. The most reliable way I’ve been able to insert such a line is by selecting the horizontal line and then pressing enter, which is not the most discoverable way to go.
My current idea is to add a plugin that always ensures that the last node in my document is a paragraph. But, I’m looking for suggestions!
There is currently no good solution for this (apart from the select-and-press-enter one). I have some plans to implement a plugin that shows a special kind of cursor for such ‘unreachable’ position at some point, but I haven’t gotten around to it yet, and it may be a while before I have time.
The problem affects more than just the last node, it also affects the first node, and actually any place where you have two adjacent non-text blocks. @marijn’s plans sound promising to me (I’d discussed with him out-of-band), so I can’t wait to see the fruits of that .
Something we’ve implemented that has had varying success is to override up/down keys and automatically insert a new paragraph if we detect you’re at a boundary. We do it at not just non-text block boundaries, but also some specialised boundaries like headings.