WebView: Automatically switch text direction according to the text
While trying to fix gnome-notes#56 (closed), I found #1263 (closed) from WebKit's bug tracker. And since I found a solution, I thought I'd share it with you:
To force WebKit to check if a language is RTL, you need to set the attribute dir="auto"
:
- On
<body>
, the first characters will decide for the whole document - On each
<div>
(that's what GitLab does for example), each block will be handled separately
The two options are not mutually exclusive.
Edited by Milan Crha