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

Set direction of the text automatically (For RTL text) #3085

Open
1 task
mokazemi opened this issue Aug 13, 2022 · 12 comments
Open
1 task

Set direction of the text automatically (For RTL text) #3085

mokazemi opened this issue Aug 13, 2022 · 12 comments
Labels
Type: Feature The issue or pullrequest is a new feature

Comments

@mokazemi
Copy link

What problem are you facing?

I can't use the editor for Right-to-Left languages, because there's no option for it.
So the editor is only limited to English and other Left-to-Right languages.

What’s the solution you would like to see?

There are some ways to set text direction automatically. For example this area that I'm writing in (Github text area!) has this feature.
So when I write something in a RTL languages, it's displayed correctly.

image

image

What alternatives did you consider?

There could at least be a button for it like some Word Processors such as Google Docs, like this:
image

But some text editors such as Github text area doesn't have it, but set the direction automatically.

Anything to add? (optional)

I'm facing this problem in the Nextcloud Editor

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@mokazemi mokazemi added the Type: Feature The issue or pullrequest is a new feature label Aug 13, 2022
@mustafa-online
Copy link

This is the only missing part that keeping me from using Tiptap.

@github-actions
Copy link

github-actions bot commented Jan 1, 2023

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Info: Stale The issue or pullrequest has not been updated in a while and might be stale label Jan 1, 2023
@mustafa-online
Copy link

+1

@github-actions github-actions bot removed the Info: Stale The issue or pullrequest has not been updated in a while and might be stale label Jan 2, 2023
@hadifarnoud
Copy link

+1

1 similar comment
@avivdaniel
Copy link

+1

@mustafa-online
Copy link

Any updates?

@amirhhashemi
Copy link
Contributor

amirhhashemi commented Apr 7, 2023

This is what you are looking for: https://github.com/amirhhashemi/tiptap-text-direction

I made a PR to add this feature a while ago but the core team didn't seem very interested. Maybe because they are not familiar with a RTL language.

@bdbch
Copy link
Contributor

bdbch commented Apr 7, 2023

@mokazemi @amirhhashemi yes we (or at least I am) inexperienced with RTL languages and I think I personally could improve here.

Could you point me to the PR regarding this issue? I'd be interested if we can implement support without breaking existing Extensions.

@amirhhashemi
Copy link
Contributor

amirhhashemi commented Apr 7, 2023

@bdbch This is the original PR: #2963
It's a little out-dated but I can update if you are interested. I haven't tested it in a real project yet but theoretically it shouldn't break any existing extension.

If you want to test the latest version checkout this repo: https://github.com/amirhhashemi/tiptap-text-direction. It's pretty much the same thing but I fixed some bugs and added more stuff.

@yousefhalabi
Copy link

@amirhhashemi thanks for the extension, i can confirm it works on vue3 and saved me a lot of the trouble cheers!

@coderyeasin
Copy link

@amirhhashemi Thank you! for developing this man, I'm facing some problems with this plugin and I'm using nextjs.
I can't write Arabic (so I don't know if when writing Arabic, it changes direction or not) , but when I paste something inline it will take RTL and click enter if I paste again Arabic text it will also take RTL, so kind of good for that but the real problem is when i paste multiple Arabic lines its make only first-line direction(RTL), others line are taking LTR. so how can I resolve it with styles that can you explain please see this pic
Screenshot from 2023-04-13 01-46-12

@amirhhashemi
Copy link
Contributor

@coderyeasin Thank you for reporting this. I opened an issue in the main repo: amirhhashemi/tiptap-text-direction#8

Please refer to that for further follow-up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature The issue or pullrequest is a new feature
Projects
Status: Triage open
Development

No branches or pull requests

8 participants