Jump to content

CK Editor - rlt - for Arabic


Recommended Posts

Hey there,

I am using PW for more than two years now and it satisfied me in all scales. Can just say: Build Bigger, Faster, Stronger, Easier.

Now we are up to make a site for refugees also in arabic and farsi.

Frontend is no problem, but how to make the Textarea/CK Editor Right to Left for Arabic?

… and/or custom Css to the Languages - is there a proper way?

Thx,

Tom

  • Like 2
Link to comment
Share on other sites

  1. Download the CKeditor plugin there : http://ckeditor.com/addon/bidi
  2. Extract the BiDi folder into your /site/modules/InputfieldCKEditor/plugins/
  3. Enable Plugin in Fieldsettings of the TextareaField under the Input Tab -> Plugins (checkbox)
  4. In CKEditor Settings -> CKEditor Toolbar, add this line :
    BidiLtr, BidiRtl, Language

Now you have three new buttons post-4048-0-91404000-1465805084.png

refs:

  • Like 4
Link to comment
Share on other sites

It is a good question.

In a good world you can use the dir="rtl" on a HTML element [click for more info]. But, to have it on the PW backend...

---

A temporary and poor "solution" would be to add dir="rtl" to the HTML tag of the theme you are using on the backend, resulting in a page with full RTL direction.

<!DOCTYPE html>
<html dir="rtl" lang="ar">
<head>
<meta charset="utf-8">
...

I tested it on the RenoAdminTheme, its a pain, as the css is not set to be RTL but it work on Textfield & co.

Feel free to test it on other themes if it fit your needs - until we get better answer ;) .

@Tom :  which backend theme are you using ?

  • Like 1
Link to comment
Share on other sites

… and/or custom Css to the Languages - is there a proper way?

Not hundred percent sure, but maybe you can make use of the AdminCustomFiles module. Besides others, it lets you create an AdminThemeDefault.css and an AdminThemeReno.css file under site/templates/AdminCustomFiles/. There you can write all your custom css in regard to each theme.

In regard how to determine which language is active, I must admit that I don't know this. This is left over for others to answer, sorry.

---

And welcome to the forums, you PW-veteran. :)

... I am using PW for more than two years now and it satisfied me in all scales. ...

Edited by horst
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...