'How can I write Persian words Left-to-Right?

I need to write Persian words in left to right mode for write Math formula in textarea html css but I cant get it working with direction:ltr; or other solutions to fixed it with direction.

I tested align-text, direction, dir Attribute and another things...

I want my result is equals to this:

User writes: سجاد+آرش+تست+تست

HTML input Show this: تست + تست+ آرش + سجاد



Solution 1:[1]

It's because when you write ???+??? , the HTML see it one word and just when you use space (" ") HTML break your word.

You can place your Persian words inside ( and ).

So instead using this: ????+???+???+???

use this: (????)+(???)+(???)+(???)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Hassan Ebrahimi