obsidian-rtl icon indicating copy to clipboard operation
obsidian-rtl copied to clipboard

Embedded content of an RTL note appears LTR in an LTR note

Open psyguy opened this issue 4 years ago • 2 comments

Hi there,

The problem arises when note A.md is LTR and B.md is RTL, and you want to embed ![[B.md]] in A.md.

The embedded content follows the text direction of the host note, i.e., A.md.

Thanks.

psyguy avatar Jan 22 '21 23:01 psyguy

Interesting, it might be fixable by selectively embedding direction tags in the markdown preview for each embed.

esm7 avatar Jan 23 '21 19:01 esm7

Yes, in fact adding a dir="auto" attribute to all the <p> tags etc. would be the best/easiest solution in my opinion. See this piece of the MDN docs. With this simple tag, (dir="auto") basically all RTL-LTR issues are solved. (People would like to see paragraph by paragraph RTL-LTR switching, and this one html attribute takes care of it. Unfortunately there's no direction: auto in CSS but the html attribute works fantastic.

<p dir="auto">من نویشته میکنم.</p>
<p dir="auto">I'm writing left to right.</p>

Renders perfectly

lingdocs avatar Feb 22 '22 09:02 lingdocs