Text Alignment Options

WISEOZ - December 7, 2007 - 03:27
Project:FCKeditor - WYSIWYG HTML editor
Version:5.x-2.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I successfully installed the FCKeditor and IMCE yesterday. All seems well except for the fact that the center and right-justify alignment selections aren't working. The left-justify one is probably not working either but the text is left-justified by default so I can't tell for sure.

Any ideas?

#1

wwalc - January 7, 2008 - 08:57
Status:active» closed

Hi,

Sorry for taking so long to reply.
1. Text alignment options makes use of the modules\fckeditor\fckeditor.css file (8 classes are defined there: rteindent1-4, rteleft, rright, rsenter, rjustify.
Make sure that you have such.
2. Enter some text in FCKeditor and switch to source view, you should see something like that: <p class="rteright">sample text</p>
3. Save story/page and take a look at source code.

If you see only <p>sample text</p>, that probably means that you haven't configured the HTML filter correctly.
Make sure that you have <p> tag in "Allowed HTML tags".

Feel free to reopen this ticket if that didn't solve your problem.

#2

WISEOZ - January 8, 2008 - 01:30
Status:closed» active

Thanks so much for responding but I'm still having difficulties with FCKEditor actually applying any formatting on the View screen. I've added numerous tags to my Full HTML input format including the

one you mentioned. I've made Full HTML my site default and given the HTML filter the highest weight of -10. Content displays as if the FCEditor weren't on at all (no tags shown either). The only way I can get FCKEditor to display the content as formatted is to select the PHP input format which is not something I want to give end users access to.

Am I missing something else with my input formats?

#3

wwalc - January 8, 2008 - 06:29

Take a look at
http://drupal.fckeditor.net/?q=node/2

If PHP input format works for you, simply copy all settings from it to other filter (Filtered HTML).
Take a look at differences between those filters and let me know what caused that problem you had.
Remember about disabling the "Line break converter" and of course disable "PHP evaluator" as well when copying settings from "PHP code".

If there's anything I could add to this page: http://drupal.fckeditor.net/?q=node/2 to help other people, let me know.

#4

wwalc - January 28, 2008 - 13:34
Status:active» postponed (maintainer needs more info)

#5

WISEOZ - January 30, 2008 - 01:56

I think I've fixed this by creating a fresh new input filter, called "Editor Mode", which only contains Full HTML. I'll see how well that works. Thanks!

#6

repolainen - March 21, 2008 - 18:42
Version:5.x-2.0-beta» 5.x-2.1

I had this problem also in 5.x-2.1. Meaning that the editor view didn't show the alignments. It did add the classes "rteleft", "rteright", etc. correctly and it showed correct after saving.

However, the problem for me was that the justify classes weren't working! So, after editing the fckeditor.config.js and removing the following lines:

// [ Left, Center, Right, Justified ]
FCKConfig.JustifyClasses = ['rteleft','rtecenter','rteright','rtejustify'] ;

the alignments started working again.

Question: Why are the justify-classes being overridden in the module's config??? The default still validates as XHTML 1.0 and is (in this case) providing correct functionality...

#7

jonahan - April 16, 2008 - 15:17

Yo.

Just confirming that I had the same issue and commenting out the line above that schoenae mentioned did the trick.

I.E.:

//FCKConfig.JustifyClasses = ['rteleft','rtecenter','rteright','rtejustify'] ;

Thanks!

#8

wwalc - April 18, 2008 - 13:47
Status:postponed (maintainer needs more info)» fixed

Question: Why are the justify-classes being overridden in the module's config??? The default still validates as XHTML 1.0 and is (in this case) providing correct functionality...

Because inline styles are stripped by Drupal if "Filtered HTML" input format is used.
However it may not work well with all themes unfortunately...

#9

hippogriffe - May 1, 2008 - 17:00

For some reason, my installation of fckEditor defaults to centered text, and I'm going bald trying to understand why! I can change the alignment as I'm writing fine, but the defaults remain the same. Has someone a clue to give as to what I should try to resolve this?

#10

codebutcher - May 1, 2008 - 17:16

Go to the modules admin screen and pick configure under the fckeditor menu. Change the CSS option to use the FCKEditor Default CSS.

#11

codebutcher - May 1, 2008 - 20:12

I found the answer here as I had the same problem where the button didn't show as highlighted (center or right justify):
http://drupal.fckeditor.net/tricks

#12

Anonymous (not verified) - May 15, 2008 - 20:22
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#13

einsicht - August 3, 2008 - 19:46

Edit: Commenting out the last line of fckeditor.config.js worked. The problem was encountered using Drupal 6.3 and a theme based on Zen.
The above worked for me as well. I tested a lot for this and noticed that it worked for all my other themes but not zen or zen-based themes. I couldn't find out why, but I'm glad I found this page.

#14

jimmb - October 3, 2008 - 22:11

Hello, I have a similar problem...

The p align="rtecenter" tag works with text in both Garland and the theme I'm using. But when I try to center an image within another p align="rtecenter" tag, the image doesn't center in the theme. It centers in Garland, though.

I tried commenting out the last line of fckeditor.config.js as well as changing the input format to Full HTML. Also, the image itself has been set to "middle" alignment in the FCK Editor image editor. But I can't get it to work.

I'm sure it's a problem with the theme and not FCK editor (note FCK editor doesn't even display when editing content - I have to use Garland as the admin theme). Still, the theme developer doesn't seem to be too responsive, so I thought I'd mention it here on the offhand chance someone knows a solution.

Thanks,

Jim

#15

crutch - February 16, 2009 - 15:35

Same applies to indent.

// This overrides the IndentLength/IndentUnit settings.
// FCKConfig.IndentClasses = ['rteindent1','rteindent2','rteindent3','rteindent4'] ;

#16

andywalters - May 1, 2009 - 18:44

Just wanted to say I had this bug, too, and commenting out that line did work. Thanks for figuring this out! It would've taken me hours.

 
 

Drupal is a registered trademark of Dries Buytaert.