Under my own tehme , when I create a content:

FCKeditor: the "Center" alignment is checked by default not the ‘Left’ alignment。

Why?

Comments

mirananto’s picture

The default alignment setting can be changed by overwriting the alignment by adding the below line in fckeditor.config.js

FCKConfig.EditorAreaStyles = "body{text-align:left;}";

mirananto’s picture

By default the alignment is center , This can be changed by overwrite the style in the fckeditor.config.js

FCKConfig.EditorAreaStyles = "body{text-align:left;}";

kjshaw’s picture

This worked to great success. This was driving me crazy...After switching to FCK default CSS, the "center" button on the toolbar would not stay selected, text did not center or right-justify in the editor window (checking the HTML, all was OK and Preview was correct) which was very disorienting. This one line fixed all my problems!

Thanks again!

FWIW, reading other posts here, i.e., http://drupal.org/node/329025, this seems to be a theme related problem as opposed to a bug in FCKEditor.

fox’s picture

Thanks - worked for me - I added
FCKConfig.EditorAreaStyles = "body{text-align:left;}";
to the last line in fckeditor.config.js

1websitedesigner’s picture

Thanks for the tip - it worked great for me too.

If only everything was this simple ...

cccarlington’s picture

If you are using the WYSIWG module with your fckeditor module installed in sites/all/libraries you will not find fckeditor.config.js in the fckeditor folder. You have to look in the wysiwyg folder /wysiwyg/editors/js folder. It should either be in /modules or sites/all/modules depending on your installation.

I added the line as suggested and it corrected the same issue for me.

gttygrl’s picture

I've also tried the advice here: http://drupal.org/node/329025#comment-1119598

Either I get left-justified but not my custom styles, or custom styles but everything's centered, even though there's nothing in my stylesheet that's centered. Or, my favorite was when I got left-justified/no styles in Firefox and centered with styles in I.E. using the same configuration.

gttygrl’s picture

I uninstalled and reinstalled FCKEditor, gave up on showing custom styles to stop the centering, but now it's doing the 'won't show centered content even though it really is centered' problem mentioned by others. I wouldn't care if it was my own site, but I'm doing it for a client, so I really need to figure out how to fix this.