Open tareefdev opened 6 years ago
Hey Tareef, welcome, glad you're enjoying it! Good point, RTL was added several months ago on the plain editor but not the extensions. I'll take a look now. I think we can definitely get RTL for most of the editors, but I'll have to double check. Thanks for the heads up!
Hi @mobitar Thanks! It would be amazing if RTL can be added to other editors.. please update this issue when you have news
So I took a look and I'm afraid none of the underlying editors (like CodeMirror) offer automatic bidirectional support. So this will be tricky to add. Does your operating system offer the choice to switch a text field's direction? I found some filler text and tested with the Advanced Markdown Editor. You can do something like this on Mac natively:
none of the underlying editors (like CodeMirror) offer automatic bidirectional support
So maybe I have to connect to upstream of some of these editors? Could you help me with some links?
Does your operating system offer the choice to switch a text field's direction?
Actually, I use Fedora (the last release), when I'm making a right click in ST desktop app nothing appear, anyway I found the "Writing Direction" option in Chrome, but it works only with the default editor.
thanks to ST team, at least we have RTL support in the default editor which is absolutely fantastic :)
Hmm strange. All of these editors are based on CodeMirror: Advanced Markdown, Minimal Markdown, Plus Editor, Code Editor, and Vim Editor. So our solution is with CodeMirror. They have an option to specify RTL during initialization, but not automatically as you type:
https://codemirror.net/demo/bidi.html
Check out the page source for how they do it, pretty straightforward. But it's not straightforward to introduce a new UI element for setting RTL on top of these editors, since the code we use does not override their UI, but just presents it on the page.
Check out the page source for how they do it, pretty straightforward. But it's not straightforward to introduce a new UI element
Can we add that little code as a new installable "Component" for Standard Notes, so after installed it users can enable an option to make direction from right to left for one note or all of them?
No, that wouldn't work. Extensions are mostly self-contained and can't influence one another. So we'd have to make a special RTL Markdown Editor to do this.
Hi @mobitar It would be great if we can have an advanced markdown editor which supports RTL so that SN will be full-featured app for RTL languages users. Please update this issue later when the new editor will be available. Thanks for your help.
Will do, thanks!
Hi there I just met Standard Notes yesterday, and I really impressed, because it's the only app which supports:
I instantly signed up for the extended plan, and it's really fantastic, the only (and critical) problem with it: those other editors (all of them) don't support RTL, only the default editor is do.
Please add RTL support in other editors