Skip to content

How can I enter right to left text? #1474

Discussion options

You must be logged in to vote

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".

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 rtl (or ltr) function.

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.m…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@aliphys
Comment options

@holomorphism
Comment options

@aliphys
Comment options

Answer selected by aliphys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants