Mark Dain Sublevel doesn't have right-to-left support :( I don't know if the Unicode character is required, I believe iOS outputs one when you change keyboard
🦿 Lucian Marin I believe CSS support is necessary. Basically I need to autodetect right-to-left text and apply a CSS class.
Mark Dain Hmm, that could be tricky, especially with mixed sentences. I wonder if we could detect if the sentence starts with the Unicode right-to-left mark (UTF8: E2 80 8F / ‏). any ideas how best to tackle this?
Martijn Auto-detection and CSS on mixed direction text! Hahahahaha... haha... ha..? Oh, you weren't joking? The I invite you (and of course) to read w3.org/Internation... The whole page is pretty on point, but for Sublevel the heading "Handling content whose direction is not known in advance" is the important one. Adding dir="auto" on the textarea and pasting in does put it as RTL in my browser. I haven't done any further testing. I only know the theory, haven't actually had to implement any of this, ever.
Mark Dain Hmm, it works for the text box but not displaying that post I made, even if I apply it on the <p> tag. Maybe this is more hassle than it's worth?
7y, 1w 1 reply
Login or register your account to reply
Martijn It probably is. In reality, only the author knows the intended direction. And even if their browser does the right thing in the textarea you still need some way to tell the back-end what the right thing is. Of course you could load up some language recognition library and trust that one to add dir-attributes to your content: indieweb.org/langu...
7y, 1w reply