Open MagedMYoussef opened 6 years ago
Do you have any example how it should look like? like HTML or PDF or image?
Here's a sample HTML of how the output should look like. I'm thinking it can be automatically implemented using javascript by detecting if the paragraph contains any RTL characters, if so, it would add an RTL class to this paragraph.
You can copy the HTML from your snip and paste into Typora, and Typora can rendered it correctly?
So what is the case that Typora cannot handle now?
The case when the text contains multiple lines. Typora will convert the first line correctly and ignores the rest of the text. See the below screenshots.
How Typora renders the content, first line only is RTL, others are LTR.
The source code.
I have found a workaround by using br tags between the lines instead of using "Enter", and it fixed the issue.
To sum up: the problem specifically happens when I press the "Enter" key inside the html div, this results in breaking the div element and any text entered after pressing "Enter" will go outside the "div" element.
+1
I love Typora and this would be a killer feature. Behavior like in Dropbox Paper (automatically detect direction, and possibly even better -- alow control on a per-line basis of a direction) would be amazing.
Would also love to have Typora support RTL.
How to make a RTL and LTR list? The application "Write!" does it like that:
Can Typora do the same?
In html there's the attribute dir
which can have the value auto
<div dir="auto">My direction depends on my content!</div>
I think it solves the problem and makes things easier
Why is direction: auto
not working in a custom user CSS? When I set direction: rtl
under #write
it easily makes all the documents display as RTL, but the 'auto' value doesn't seem to do anything.
@esm7 because it's an invalid value. auto
is in html's attribute dir
only. css direction
doesn't have it basically.
@abnerlee we need your help then, any chance to go for dir="auto"
? It sounds like a simple change that will do wonders for RTL users and align Typora with most native apps that handle text direction automatically. When using dir="rtl"
things work beautifully for RTL texts, so if it just switched automatically there can be a big check mark on RTL support in Typora.
(I'm not using the solution of a theme with permanent direction: rtl
because just a portion of my notes are RTL, and I assume others are not using it for the same reason)
Any action on this recently?
use dir="auto"
may require #1939
When writing inline math in RTL mode, the inline math gets all mixed up. It seems like adding dir="auto" to the Githubissues.
Is there a plan to support mixed RTL and LTR content? Or can I use javascript to add the custom logic for this?
I've also tried using the html div tags that were added in the recent version (0.9.54) but Typora is rendering every line as a separate paragraph tag and it completely ignores my div tags.