Is there an example or perLineTextDirection?

Hi all,

I want to use codemirror in an RTL/LTR environment. Is there any working example of using perLineTextDirection to store and set the direction per line? Any application that already uses it will greatly help me.

Thanks in advance

No, but the idea is something like this script – you either compute line directions yourself and explicitly set them per visible line, or just add dir=auto to every line (unfortunately doesn’t seem to be possible with just CSS, so you need a plugin to add the DOM attributes).

Thanks. The example already does a lot of things I wanted to do. I expected a more complex code like bidihandler of Ace editor to enable RTL :slight_smile: