noteworthy icon indicating copy to clipboard operation
noteworthy copied to clipboard

Right-to-left (RTL) languages support

Open Hashemian01 opened this issue 4 years ago • 3 comments
trafficstars

Please consider adding support for Right-to-left (RTL) languages (Arabic: 422 million speakers + Hebrew 5 million people + Persian/Farsi 110 million people + Urdu 70 million people )

Resources: https://www.w3.org/International/questions/qa-html-dir

Hashemian01 avatar May 05 '21 02:05 Hashemian01

Thank you for the suggestion! RTL support (and support for CJK scripts as well) has been in the back of my mind but I'm pretty clueless about how to get the user experience right. In some ways, this might be out of my control, since:

Could you do me a favor and try out the example editor on the ProseMirror site and let me know if everything works the way you expect as a RTL user?

  • If it does work as expected, it should be straightforward to get RTL working in Noteworthy.
  • If it does not work as expected, I suspect there are some deeper issues to solve in ProseMirror / remark that will block RTL support in Noteworthy

I will do an audit of the existing code to see if there are any places where I'm doing something obviously RTL-incompatible. Long term (once Noteworthy has a public release) I hope to have some RTL / CJK users who can help me get language support right.

benrbray avatar May 05 '21 03:05 benrbray

I did a test on Prosemirror Markdown and WYSIWYM example editors. This is what a bidi example looks like on these editors: image

This is what it supposed to look like: image

Apparently just like Codemirror, RTL is not implemented there. I'm not sure how much of it is under your control but usually RTL speakers need a bi-directional editor where each paragraph/block has its own direction. The common approach is to detect the first character of each paragraph and automatically change the direction based on that character. Even a manual way to switch between directions is helpful (example: CTRL/⌘+ L-shift/R-shift shortcuts or a dedicated button).

Hashemian01 avatar May 05 '21 17:05 Hashemian01

Also requires addressing benrbray/prosemirror-math#41

benrbray avatar Jul 16 '22 12:07 benrbray