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

editor: added support for default text direction #7060

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

luis-411
Copy link
Contributor

@luis-411 luis-411 commented Dec 5, 2024

Addresses: #4654

Added option in editor settings to enable different text directions by default

@thecodrr
Copy link
Contributor

This won't work because changing the default text direction also changes the direction of all the paragraphs old and new. This is probably not the expected behavior. We want the text written when default text direction is RTL to remain RTL even if we switch to LTR later on.

@luis-411
Copy link
Contributor Author

This approach seems promising, but it does not work yet, because when performing this:
editorContainer.style.direction = useEditorStore.getState().getActiveSession()?.textDirection || "ltr";
the value of useEditorStore.getState().getActiveSession()?.textDirection is always undefined.
Other values like title are undefined as well. I think I have to maybe use a different function to get the value correctly. Do you have an idea of what is wrong here?

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