Hello codemirror society!
First of all, I really appreciate your great work on codemirror!
I encountered an issue while using codemirror in editing Arabic documents. If the text editor direction is RTL but the line ends with text that is LTR, you can’t type any thing after that LTR text! Here is an illustration of what I mean from your RTL example:
As you see, I typed 10
at the end of the line. I can’t type a space after the 10
since codemirror will insert the space BEFORE the 10
. I can’t also break the line since codemirror will insert the line break BEFORE 10
too.
Thanks for attention. Best regards.
Editing on direction boundaries is messy, but I don’t think this is really a bug. It matches Firefox’s native editing behavior in this situation (though Chrome indeed behaves differently). You can put your cursor at the end (right) of the number to insert right-to-left text after it. In fact, just continuing to type after you type the number seems to work fine. It’s only after you move the start (left) of the number that inserted text will go before it.