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 text direction buttons #7

Open
hadifarnoud opened this issue Feb 14, 2021 · 6 comments
Open

add text direction buttons #7

hadifarnoud opened this issue Feb 14, 2021 · 6 comments

Comments

@hadifarnoud
Copy link

please add RTL and LTR buttons too, thanks

@roslovets
Copy link
Member

Hi! Seems like there is no special buttons for RTL and LRT in CKEditor 5. It should work automatically.

@hadifarnoud
Copy link
Author

what you're referring to is UI direction. looks like CKeditor5 does not have directional buttons as CK4. it's either the entire text RTL or LTR. That is a significant issue as you may want to enter English or any other LTR text right in the middle of your article.

I did not find any way of doing this in current CK5
ckeditor/ckeditor5#8989

@Tboul
Copy link

Tboul commented Nov 4, 2021

Hi! Seems like there is no special buttons for RTL and LRT in CKEditor 5. It should work automatically.

It works automatically only when you select an RTL language (i.e Hebrew or Arabic) for the UI. so the change must come from the custom build which have to include the language feature.

@muhdlaziem
Copy link

what you're referring to is UI direction. looks like CKeditor5 does not have directional buttons as CK4. it's either the entire text RTL or LTR. That is a significant issue as you may want to enter English or any other LTR text right in the middle of your article.

I did not find any way of doing this in current CK5 ckeditor/ckeditor5#8989

What's the update here? really need that feature

@muhdlaziem
Copy link

muhdlaziem commented Apr 11, 2022

Apparently there is a PR merged here ckeditor/ckeditor5#9074 said that.

Feature (language): Added language dropdown button to support text part language. Closes ckeditor/ckeditor5#8989.

Here is the documentation: https://ckeditor.com/docs/ckeditor5/latest/features/language.html

@AbobkerElaghel
Copy link

AbobkerElaghel commented Oct 10, 2022

Any Update on This??
because the Text Part feature does not change the direction of the content selected.

As you can see Here in the output of CKeditor5 the first text on highlighted (selected from language dropbox) as English when editing in Ckeeditor5

<p>
<span lang=\"en\" dir=\"ltr\">ENGLISH</span>
</p>

This one is highlighted in Arabic from the language dropbox.

<p>
<span lang=\"ar\" dir=\"rtl\">عربي</span>
</p>

it adds a span tag inside whatever tag you heading or tag you selected and inside that span tag, it adds dir and lang to ar also which renders it useless and the dir effect will not take place.

the dir and lang attributes should be on the outer layer which is in this example the P tag and not a span inside the main tag

PLUS,
It clearly says in the ✨ Features section of the README File in this package that it does support automatic UI and content selection based on the language defined in the strapi user profile, but it does not. it always defaults to English.

ALSO: The CKEditor does not have a text direction option in the toolbar items options and I don't know why?? since you guys have the RTL Feature developed (coded) already when I hard code the Language of content to ar (Arabic) in the config/plugins.js file in strapi?.
So why you don't just add a toolbar item button to change the direction on runtime while the end user is writing the content in CKEditor5 Editor?
because you have the scenario where The content is mixed between two languages (Arabic/English) for example.

"@_sh/strapi-plugin-ckeditor": "^1.1.2",
"@strapi/plugin-i18n": "4.4.1",
"@strapi/plugin-users-permissions": "4.4.1",
"@strapi/provider-upload-cloudinary": "^4.4.1",
"@strapi/strapi": "4.4.1",
"pg": "^8.6.0",
"pg-connection-string": "^2.5.0"

 Node: 16.15.0

 Tried on both Dev and prod environments, error occurs on both.

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

No branches or pull requests

5 participants