Example: if I use arabic language the text field direction will be rtl and if I want to write a new text and I switch to the English language the direction inside the text field
aaaaand the css needed is "direction" with the values of "ltr" or "rtl"
css:
textarea.rtl { direction:rtl; } textarea.ltr { direction:ltr; }
or
document.getElementById("myTextArea").style.direction = "rtl"
supported by all major browsers.