See this thread. I don’t think it’s necessary to insert directionality characters—you can just use CSS unicode-bidi
styles. But at the moment the editor’s bidi algorithm won’t know about this (it doesn’t query the dom for the direction at every single span—that’d be really annoying and expensive).
So the proposal in that thread is to add a mechanism to feed information about bidi isolates to the algorithm that computes the text order, somehow. I have taken a stab at it but it requires some serious complication of code that needs to be fast, and I haven’t found the time to finish it yet.