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

Add controls for RTL/LTR/Auto #21

Open
alirezaalavi87 opened this issue Jun 26, 2024 · 2 comments
Open

Add controls for RTL/LTR/Auto #21

alirezaalavi87 opened this issue Jun 26, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@alirezaalavi87
Copy link
Contributor

Hi,

I think it would be great to add more control, like obsidian rtl does.
It helps for gaining more control over your text, if you want to for example force RTL or LTR in a certain page or document.

image

You might don't want to implement this feature now, but you can put it in the roadmap.

Thank you

@ahangarha ahangarha added the enhancement New feature or request label Jun 26, 2024
@ahangarha
Copy link
Member

I can think of one implementation as such:

  • The default behavior is as is unless a block (including a page) has a metadata like direction: rtl/ltr. In such cases, the whole block gets explicit direction and the bidi functionality won't get applied in that block and its child blocks.

How does it sound?

@alirezaalavi87
Copy link
Contributor Author

I think almost copying what obsidian-rtl does would do the job.
but I think we need to also have a block direction like you mentioned.

  • per-page direction
  • per-block direction

how to do this?

I'm not so sure, I'm at the middle of my exams and didn't have the time to read and understand how obsidian-rtl does it, but I understand the entrypoint is this function

I might do it and create a PR after my exams.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants