medium-editor icon indicating copy to clipboard operation
medium-editor copied to clipboard

Handling bi-directional text RTL mixed with LTR

Open smhnfreelancer opened this issue 2 years ago • 3 comments

Description

Handling right-to-left/left-to-right override characters in user input

[Description of the bug or feature]

I think there is a missing feature, in the editor, it's called Right to Left embedding, you need to insert "#x202b;" character, to mix RTL Text with LTR, sometimes it's really necessary for RTL languages, you can refer to some articles below:

1- Why words are shuffled when I insert English words in any Arabic/Urdu/Persian text on Notepad or MS Word?

2 - Handling bi-directional text in Memsource Editor for Web

smhnfreelancer avatar Dec 16 '21 16:12 smhnfreelancer

english-farsi

this is how it works in Microsoft word, when you switch to Persian, and hit space the order of the words remain RTL, like desired

smhnfreelancer avatar Dec 18 '21 08:12 smhnfreelancer

medium-editor

This is how it works in Medium editor, note that after typing "English", I switched the keyboard language to Farsi(Persian), still, it's not working like Microsoft word, as desired, and English words will type in LTR format, please note that when you are typing English words in the middle of Farsi, if you didn't switch to Farsi, after typing the word "English", and hit the SPACE the next word "vocabulary" will be in the LTR direction order, But if you switch the language to Farsi, after typing the word "English", and hit the SPACE, the desired result will be like this "Vocabulary English"... AND THE TRUE AND FAMILIAR LOOKS, is what Microsoft word is capable of, which is missing in the medium editor

smhnfreelancer avatar Dec 18 '21 09:12 smhnfreelancer

Hi @smhnfreelancer,

so in general, is it working with RTL?

omarkhatibco avatar Jan 22 '22 19:01 omarkhatibco