Hi! I came here after spending considerable time implementing a simple autocomplete input with embedded entities. This is very similar to the ProseMirror’s dino demo.
I have a question and a bug report
The bug: I can see that you have the same issue that I’ve encountered: whenever there is a contententeditable="false"
right inside of the contenteditable
, the cursor disappears in Firefox. For example, in the dino demo you can remove (backspace) all the text before the dino to see that the cursor is invisible. It’s there in Chrome.
The question: what is the reasonable approach to implement my use case? I need just a single line of plain text + the “dinos” (not exactly images, but interactive nodes that will be handled by the outside code). I’ve created a simple demo using ProseMirror that already works better that my own code:
My concern is that ProseMirror is a pretty large package — 250KB of JS seems excessive. What I like about ProseMirror is that it already has a lot of knowledge about the peculiarities of the contenteditable. So far the attempts to fix my own tiny codebase seem endless.