In a textarea, change the direction of the current line from "rtl" to "ltr"

css, jquery

Solution

This is not possible, the text direction can only apply to the entire `textarea` element, not the lines within it.

Problem

I have a textarea with direction from right to left ``` #myTextarea { direction: rtl; } ``` on an event, with jquery, i change the direction from left to right : ``` $('#myTextarea').css('direction', 'ltr'); ``` this move the whole content of the textarea from right to left. I want to move only the current line, and let the previous lines in their default direction. Is there a way to achieve that ?

Original source