Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right-to-left (RTL) languages support #9

Open
Hashemian01 opened this issue May 5, 2021 · 3 comments
Open

Right-to-left (RTL) languages support #9

Hashemian01 opened this issue May 5, 2021 · 3 comments

Comments

@Hashemian01
Copy link

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

@benrbray
Copy link
Owner

benrbray commented May 5, 2021

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.

@Hashemian01
Copy link
Author

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).

@benrbray
Copy link
Owner

Also requires addressing benrbray/prosemirror-math#41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants