Closed (fixed)
Project:
FCKeditor - WYSIWYG HTML editor
Version:
6.x-1.2-1
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Jun 2008 at 07:13 UTC
Updated:
20 Jan 2010 at 06:55 UTC
Comments
Comment #1
wwalc commentedYou can try this as a temporary solution:
edit your FCKeditor profile, go to "Advanced options" -> "Custom javascript configuration" and add:
let me know if that worked.
Comment #2
Jorrit commentedComment #3
Afief commentedYes that worked like a charm. It should be integrated with the Arabic/Hebrew profiles as those languages flow from right to left naturally.
Comment #4
Jorrit commentedWe could do this automatically by looking at the language object or providing a configuration option. I'm adding this as a feature request for further investigation.
Comment #5
Afief commentedI am not entirely sure of the following but I thought I'd share it anyway:
FCKEditor itself(not the Drupal module) does not change to RTL when loading a language configuration even though the files do have rtl specified(he.js, line 27: Dir: "rtl")
If this is fixed in FCKEditor all that would be needed in the drupal module is giving the user a choice between autodetect language, match drupal's locale setting and manually specifying the language.
In my opinion this would be a more elegant solution.
Comment #6
Jorrit commentedIf I get it correctly, FCKLang.Dir is only used for the GUI elements and ContentLangDirection is used for the content. This is purely FCKeditor, so you've got to file a bug with them if you want to change this behavior.
Comment #7
Afief commentedI talked to a couple of FCKEditor devs, they say this is a feature not a bug.
I have used the standalone FCKEditor recently and it works fine; when you already write php code changing the options manually suddenly seems natural, however as a module I think it would be more userfriendly if we had a switch for the direction with three options: RTL, LTR, get direction from $language.
Comment #8
lameei commentedsubscribing!!!!
Comment #9
avior commentedThe solution described in the #1 worked for me
but, I have a site that needs to add both hebrew & english articles, so i need this to be more flexible
my question is, is it possible to add buttons for RTL & LTR for a section so it will be dynamic
the button will add dir="rtl" or dir="ltr" for section selected
Thanks
Comment #10
wwalc commented@avior: does "Style" button solve your problem? Try adding this button to your toolbar.
Style definitions are in fckstyles.xml, there are 4 LTR/RTL style definitions available as an example.
Comment #11
wwalc commentedI have committed just a while ago a small chunk of code that adds automatic RTL support to FCKeditor module in 6--2 branch (requires "Locale" module to work).
It should be available tomorrow as a FCKeditor 6.x-2.x-dev package (click on a "View all releases" link to see it).
Please note that 6.x-2.x-dev is unstable, untested and so on. It contains some nice new features however (see CHANGELOG.txt for more details), so if anyone is willing to give it a try, please test it and let me know what's your opinion.
Comment #12
avior commentedHi
Thanks , This is working ok
can i add custom buttons to the toolbar to make this functionality easier to use ?
Comment #13
wwalc commentedOk, marking it as fixed. Any RTL/LTR users if you still think that RTL support could be improved, feel free to reopen this ticket and write your suggestions (remember that automatic RTL support is in 6.x-2.x).
@avior: you can create your own plugin that adds such button. There is no chance that such button will be available in FCKeditor 2.6.3 (http://dev.fckeditor.net/ticket/809). However, in CKEditor 3.x there should be much more plugins created by community so there is a chance that someone will create such button in place of select box with styles. If you want to create your own plugin for FCKeditor, you may want to take a look at the following sites:
http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Customization/P... (scroll down to a link with sample plugins, it's always easier to work having some working examples)
http://www.fckeditor.net/forums
Comment #14
wwalc commentedComment #15
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #16
tcibah commentedHello & sorry to re-open this issue for a 5.x-2.2 case.
Wrote a tiny module to update direction, ltr or rtl, in the fckeditor_settings table based $locale value. Now it is invoked on each page load and it works.
To improve performance, what condition should be used to load that module? In other words: would be good to invoke it only for pages where for which the fckeditor is loaded
Comment #17
avior commentedHi
I think that automatic paragraph direction is wrong
The client should be in control what directionality is applied to his paragraph , in other words you can write a lrt paragraph even if your site is rtl
one solution is to use http://drupal.org/project/pdir that do this automatic by the first word of the paragraph
another (and the most common is to use buttons to let the user decide, this is missing in the default installation of this module)
Comment #18
lameei commentedIn RLT site I think it is better to have the direction RTL by default and in LTR let it to be LTR. And also a direction button is what we should have in toolbars.
Comment #19
boazr commentedIf anybody is interested, on CKEditor the config line mentioned in #1 is:
config.contentsLangDirection = 'rtl';
Comment #20
boazr commentedAs it may, I would rather have a RTL and LTR paragraph buttons. We used to have them on tinyMCE, there are easily made enabled on the wordpress' mce for example. That would solve a lot of problems (and of course still control which is the default directionality state).