-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for RTL languages #3991
Comments
we can show any rtl text in the current version using div tags
but it is rather hard. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@laurent22 |
Let's keep this bug open to track this issue, and I've also added a few links from past discussion in the top post. What's not working by the way? It would be good if someone could confirm what works or not on the following elements.
Also please provide some example Arabic text: the actual text (that can be copied and pasted, not a screenshot), and how it's supposed to look (a screenshot), because I don't know Arabic language so I don't know when it's displayed RTL or LTR. |
Hi @laurent22 , Thank you for your attention on this issue , you will really save the RTL users from this annoying bug. Desktop : Markdown editor and Marktop viewer :In Desktop client , on markdown editor and viewer , we can write in RTL languages and languages are supported but layout is not respected and it's remain on LTR : Desktop: Rich Text :Mobile : Text Editor :Layout and RTL is OK. Mobile : Text Viewer :RTL languages are supported but layout is not respected : Correct layout of RTL :As you see in screenshot , RTL should start from right to left and this is true form. Some example texts in Arabic , Hebrew and Persian :Arabic :
Hebrew :
Persian :
Test Devices :Desktop : Joplin 1.6.7 appimage on Arch Linux , Kernel 5.10.7. |
I found a workaround to fix Desktop rendering of RTL notes: I simply added: #rendered-md p {
unicode-bidi: plaintext;
} to The first line is pure Farsi, the second line is mixed Farsi-English, and the third line is pure English, which they all render properly. There's still one issue that makes it a bit inconvenient working with the editor. If you look at the second line (mixed Farsi-English) in the editor (not the rendered markdown), it doesn't look right. Similar issue for the first line in the editor: look at the placement of the "dot", which should be at the end of the sentence (like it is in the rendered markdown) Edit: Here's a mixed Farsi-English note for reference: which is btw not rendered properly on GitHub! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Note: It's now done for Markdown editor and Preview |
Is there any update on this issue? |
+1 Although the text editor has many issues but it can render the text most of the cases in the right layout while the viewer doesn't at all. The viewer always render the text in LTR
|
No RTL in vscode , no RTL in joplin , no RTL in many others , why apps like this with many users have issue with RTL ? , RTL is cursed ! |
Most editors support RTL. RTL is not needed in VSCode because most programming languages based on languages grammar in LTR. |
see this fix #6177 (comment) |
I did a little testing on this with Hebrew, some Markdown features work and some do not. I used the lyrics to a song in both English and Hebrew to demonstrate: The checkboxes are totally broken, nested bullet lists do not work, and deleting characters at the beginning or end of a line is extremely frustrating, in both keyboard layouts. It seems to always want to delete as if the language was LTR. Apparently Showdown is able to display and edit RTL properly, I'm not sure if this can be implemented but I am willing to give it a shot. |
i have problem with search in Persian language |
#6177 (comment) |
Thanks for the suggestion but it doesn't fix it correctly!!! Your suggestion: ul:not(ul.jop-noMdConv) {
direction: rtl;
& li.md-checkbox.joplin-checkbox.maps-to-line {
position: relative;
left: 3em;
& input[type="checkbox"] {
margin-left: 0.7em;
margin-right: 1.71em;
}
}
}
p.maps-to-line:has(> en, ltr) + * {
direction: ltr;
& li.md-checkbox.joplin-checkbox.maps-to-line {
position: relative;
left: -3em;
& input[type="checkbox"] {
margin-left: 1.71em;
margin-right: 0.7em;
}
}
} |
It might uses different selector for numbered lists let me fix that real quick |
:is(ul,ol,dl):not(.jop-noMdConv){ } Here is the fix. It still isn't perfect since when in full edit view the checkboxs override the text but it's better then nothing I guess |
:is(ul, ol, dl):not(.jop-noMdConv) {
direction: rtl;
& li.md-checkbox.joplin-checkbox.maps-to-line {
position: relative;
left: 3em;
& input[type="checkbox"] {
margin-left: 0.7em;
margin-right: 1.71em;
}
}
}
p.maps-to-line:has(> en, ltr) + * {
direction: ltr;
& li.md-checkbox.joplin-checkbox.maps-to-line {
position: relative;
left: -3em;
& input[type="checkbox"] {
margin-left: 1.71em;
margin-right: 0.7em;
}
}
}
|
Oops I discovered it doesn't work fine! |
Yeah this is the idea and if you want the next line or list to be ltr add this |
Add what?! |
My bad . Github didn't show this because i didn't put it inside of code block |
as @rio-codes tested bullet points with Hebrew I've found the same issue with tables and quotes in the Linux desktop app |
Any updates on this issue? Is anyone actively working on this? |
wondering the same :'( Joplin, Standard Notes, Notesnook... how come NON of them properly support RTL? edit: SN does seem to support RTL now... nice @mojienjoyment |
Ruslin-android, a note app for android can show rtl and ltr languages correctly. Devs can get idea from it on 1,2,3,4 |
There is a repository on GitHub that has full support for RTL languages implemented: SimpleMDE - Markdown Editor (RTL). Additionally, there is an online Markdown editor based on this implementation: Dawin. Maybe it can be used as a reference to implement support for RTL languages in Joplin. Unfortunately, I'm not familiar with JavaScript or TypeScript, so I'm unable to work on this myself. |
Related to laurent22#3991. This change: - Only applies to the CodeMirror 6-based editor (not the CodeMirror 5-based editor). - Enables CodeMirror's per-line text direction option (`perLineTextDirection.of(true)`). - Adds `dir=auto` to every visible line in the CodeMirror 6 editor.
do no RTL yet? |
Any updates on implementing rtl support? |
Have you plan to support RTL languages, Joplin supprts Farsi as its interface language, but when we type in persian in the text editor, all texts are viewed in left to right mode.
The text was updated successfully, but these errors were encountered: