-
Notifications
You must be signed in to change notification settings - Fork 36
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f666627
to
676c980
Compare
darrensiegel
approved these changes
Oct 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.
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.