Bidirectional Text, Left-To-Right and Right-To-Left in the same line

Steps to reproduce

  1. Start the line with English text
  2. End the line with Hebrew text (or presumably any RTL text)
  3. Press end

Expected result

I expect to be taken to the end of the line, i.e. the end of the last Hebrew word in the line

Actual result

I am taken to the beginning of the Hebrew text (presumably because it is visually the end of the line)

Note that this does work in the title bar.

Environment

  • Operating system: Windows 10
  • Obsidian version: v0.11.13

Additional information

![image|230x46](upload://rlxZSBu6VWTMuCd3MGK5plUYik6.png)

See picture where it looks like it is selecting both sides of the Hebrew word

1 Like

That’s the behavior of CodeMirror, the underlying editor that Obsidian uses. Since Obsidian doesn’t officially claim to support RTL text, the best bet is to open a bug in CodeMirror, which I did here. But no one wants to pick it up because it’s very patchy and will probably get much better in the upcoming CodeMirror rewrite (version 6).
In the meantime, you can improve some of Obsidian’s behavior with RTL, even if not this specific issue, using my RTL plugin.

1 Like

Thanks. Looks like CodeMirror 6 will be out relatively soon, so likely to have a fix in the near future.

Can I clarify - your plugin is for RTL overall within a file, but doesn’t really touch combining RTL and LTR text?

Correct. My plugin activates the RTL support of CodeMirror and improves a few behaviors that could be improved from the context of a plugin. Combining RTL and LTR text is something that requires deep CodeMirror support.

I just want to clarify that Obsidian won’t immediately switch to CM6 when it’s out of beta on desktop. It’s currently used on mobile, but it doesn’t support some things people like from CM5 (i.e. VIM mode, that depends on a plugin someone wrote for CM5).

Thanks. Do you happen to have some sort of idea of timelines then?

I am planning on using this a little more ‘in anger’ over the next few months so I just need to work out if I’m going to have to use a different text editor and then just use obsidian for its other functionality

Sounds like utilizing the CM6 abilities in Obsidian (desktop) will take at least a few months, but I’m optimistic that the RTL capabilities will get much better in time.
I do plan to spend a day or two later this month improving the RTL support plugin. It won’t get to LTR/RTL mix and some bugs can’t be solved, but there are a few annoyances that I definitely intend to solve, for what it’s worth.

I will move this to feature requests.