How can I enter right to left text? #1474
-
When entering text in a RTL language (e.g. Persian, Arabic and Hebrew) the characters are not correctly recognized. You can see this in the image below. With the magic ✨ of MS Paint, I can show what the Persian section should look like. This is the Markdown code I entered. How should I change it so that the RTL text is displayed correctly?
Failed Solutions
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I don't know much about RTL languages, but it looks like you can use the "direction" property of CSS. html"""
<style>
pluto-output div.markdown { direction: rtl; }
</style>
""" Or if you want only the selected markdown cells to be "right-to-left" (or "left-to-right"), you can insert the following cell and use the begin
function add_class(cls, md)
HTML("<div class='$(cls)'>", repr(MIME"text/html"(), md), "</div>")
end
rtl(md) = add_class("rtl", md)
ltr(md) = add_class("ltr", md)
html"""
<style>
pluto-output div.rtl > div.markdown { direction: rtl; }
pluto-output div.ltr > div.markdown { direction: ltr; }
/* If you want to make rtl the default */
pluto-output div.markdown { direction: rtl; }
</style>
"""
end |
Beta Was this translation helpful? Give feedback.
I don't know much about RTL languages, but it looks like you can use the "direction" property of CSS.
By inserting the following cell, all Markdown cells will be "right-to-left".
Or if you want only the selected markdown cells to be "right-to-left" (or "left-to-right"), you can insert the following cell and use the
rtl
(orltr
) function.