Forum closed. New forum available at http://community.wymeditor.org/

Alignment option in the dialogs & in the WYMeditor iframe.

Discuss features, code, contributions, ideas, suggestions, ...
For bugs, patches and feature requests, please post on the Trac:
http://trac.wymeditor.org/

Alignment option in the dialogs & in the WYMeditor iframe.

Postby dor on Sun Aug 17, 2008 8:02 pm

Hello,

I would like to suggest a tiny new developers option: text alignment in the dialog boxes and in the WYMeditor iframe (i.e. textarea tag).

The most used language in my website is Hebrew.
As you may know (or not...), the Hebrew language requires text-alignment to the right of the document. The text is read from right to left (rtl). Thus all the elements and the text within should be aligned from right to left.

I've tried to do so on my own.
The code I wrote was:
Code: Select all
jQuery(function() {
               jQuery('.wymeditor').wymeditor({
                  stylesheet: 'styles.css',
                  lang: 'right',
                  postInit: function(wym) {wym.hovertools();},
                  editorStyles:[{"name":"body", "css": "text-align:'right';direction:'rtl';"}],
                  dialogStyles:[{"name":"body", "css": "text-align:'right';direction:'rtl';"}]
             });
         });

The result was not completely as I expected.
The text in the WYMeditor iframe was aligned OK, but the dialog documents were aligned improperly: the elements didn't changed their position at all.

Please consider adding this tiny built-in option of aligning the WYMeditor iframe and dialog boxed. It would be very helpful.

Thanks,
Dor.
I'm not an English speaker, so sorry for my English mistakes (if there are any) or misunderstanding that caused by my lack of knowledge in English.
dor
 
Posts: 17
Joined: Sun Aug 17, 2008 7:39 pm

Re: Alignment option in the dialogs & in the WYMeditor iframe.

Postby jfh on Wed Aug 20, 2008 7:08 pm

User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Re: Alignment option in the dialogs & in the WYMeditor iframe.

Postby dor on Sat Aug 23, 2008 6:36 pm

Hi jfh,

As I understood it, the ticket ( http://trac.wymeditor.org/trac/ticket/89 ) means to add a button to the WYMeditor so that the end-user will press on it and change everything to RTL.

While I meant to add the same option to the programmer, so that everything would be changed to RTL with a small Javascript code when the WYMeditor is initialized (this way, the end-user won't have to press on that button, so it will be much more convenient ).

Did I understand the ticket right?
I'm not an English speaker, so sorry for my English mistakes (if there are any) or misunderstanding that caused by my lack of knowledge in English.
dor
 
Posts: 17
Joined: Sun Aug 17, 2008 7:39 pm

Re: Alignment option in the dialogs & in the WYMeditor iframe.

Postby jfh on Sat Sep 06, 2008 8:27 pm

Yes.
I've added the 'direction' option. Just initialize it to 'rtl', and it will set the html 'dir' attribute of the iframe and dialogs.
See revisions 532 and 533.
Nightly build available (tonight ;) ).

Thanks for your feedback.
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium


Return to Developers

Who is online

Users browsing this forum: No registered users and 3 guests

cron