DEV Community

Muhammad Azeez
Muhammad Azeez

Posted on • Originally published at mazeez.dev

3 3

Supporting Bi-directional text in Html TextArea

A <textarea> is an HTML element used to capture multiline user input. By default, it's direction is either right to left or left to right. But what if we want each paragraph to have it's own direction. This is very useful when the text is a mix of multiple languages. For example: Kurdish and English.

I asked the quesiton on Twitter and my good friend Akam Foad came to the rescue:

have you tested applying unicode-bidi: plaintext on textarea?https://t.co/UC8A0ZKYKj

— Akam Foad (@akamfoad) January 13, 2022

It turns out, that you can easily support this by specifying unicode-bidi: plaintext in the styles of the <textarea>

<textarea style="unicode-bidi:plaintext"></textarea>
Enter fullscreen mode Exit fullscreen mode

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay