Skip to content
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

[Feature] Right to left text authoring #4335

Merged
merged 16 commits into from
Oct 26, 2023
Merged

Conversation

marc-hughes
Copy link
Contributor

@marc-hughes marc-hughes commented Oct 20, 2023

This PR adds a menu-option in slate editors, and a button on the markdown editor that will enable right to left text formatting & authoring for languages such as Arabic.

image
image

When enabled, the editor will operate in right to left mode.

If you're typing English text, it acts more like a right-aligned text with some weird rules for punctuation. Typing Latin characters is not a good test. When typing a right-to-left language, the characters will be inserted to the left of the text, as one would expect. I've downloaded some other right-to-left enabled editors, and this seems to be the correct behavior.

righttoleft

Delivery mode should match what you see in authoring.

Caveat: I do not know any right to left languages, so I'm solely testing this by using a foreign-language setting on my keyboard and typing gibberish, then comparing that to the same gibberish in an external editor with RTL support.

The editor will remember your last right/left selected option and attempt to create new elements using that format. This will be useful for someone creating a full course in an RTL language. It may be confusing/annoying if someone ever accidently picks the option, or if they only need RTL in a few sections.

@marc-hughes marc-hughes force-pushed the feature/MER-2646-text-rtl branch from f666627 to 676c980 Compare October 24, 2023 17:25
@marc-hughes marc-hughes marked this pull request as ready for review October 24, 2023 17:26
@darrensiegel darrensiegel merged commit 125f9b0 into master Oct 26, 2023
@darrensiegel darrensiegel deleted the feature/MER-2646-text-rtl branch October 26, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants