Hello,
I have used FCKEditor on a number of my websites. This time after installing it I ran into an error. I am using the (Drupal 6 patch) Denver theme in Drupal 6.5.
Whenever I go to "Create Content" FCKEditor loads. When I click into the FCK text field, however, the pointer moves the center. Whenever I type something, it is centered and limited to an inch in width. I noticed that the "Center" alignment is checked by default. When I click right align, it moves about an inch to the right. When I click left align, it moves about an inch to the left. However both times it is still in the middle of the text field.
So it is stuck in Center alignment. I have re-installed FCKEditor a couple of time to try to fix it, but it never worked. Each time I load FCKEditor, the text is stuck centered. I pasted a large paragraph into it, and it reformatted it into an column in the center of the page, about an inch in width.
Hopefully someone can help. Thanks it advance.
Best Regards,
-ROR
Comments
Comment #1
Artur Formella commentedI can confirm this bug, but FCKeditor does exactly what it's supposed to do. It loads all style sheets to improve WYSIWYG editing.
I'm moving this issue to Themes/Denver.
I set Version to 5.x because 6.x is not available
Comment #2
root_of_roots commentedI see. So it is a Denver-specific bug? Good thing I mentioned it, eh?
Regards,
-ROR
Comment #3
root_of_roots commentedAnyone know of any patches or fixed for this?
Seems like it just may be a CSS glitch...
Thanks!
-ROR
Comment #4
dleeward commentedI can confirm this bug.
Comment #5
skstarkiller commentedTry this...
Go to admin/settings/fckeditor/edit/ and choose the role that you are having issues with. Edit it and choose the CSS settings. For Editor CSS choose FCKEditor Default. For Predefined styles use theme fckstyles.xml and then copy sites/all/modules/fckeditor/fckeditor/fckstyles.xml inside your theme directory (sites/all/themes/denver/fckstyles.xml).
That worked for me!
Comment #6
imclean commentedTo share my experience, I had this issue with a different theme, using fckeditor with all the stylesheets including the theme's.
The theme I was working on included "text-align: center;" in the body tag. The iFrame used by fckeditor is essentially a complete page including the tag, which therefore centred everything within it.
Because the pages have at least one class in the body tag and fckeditor's body tag doesn't, to fix the problem I took the centre alignment out of body style and added it to body.class instead.
This is with Drupal 6.
Comment #7
dleeward commentedThis is also happening in Tapestry theme.
Comment #8
ratnesh aarohi commentedFor tapestry theme - I tried the solution given in #5 by skstarkiller
and seems to have made things fine.
here is what i did (quoted from #5)
Will know in more detail when i use the editor extensively.
Comment #9
festus commentedThe centering happens in the Tapestry theme because the body tag in style.css has:
text-align: center; /* centers container in IE 5 */
This was mentioned by #6 imclean though I'm not sure what theme he was using. The suggestion by #8 geniekids and #5 skstarkiller works for me. But, if you really want to use the "theme css" as the FCKEditor CSS, you could remove the IE 5 styles from style.css and place them in an IE-only style sheet, say IE.css. Then, you would need some conditional code in page.tpl.php to load the IE style sheet when appropriate:
Then as long as you aren't using IE 5.5 or earlier to create content, the text alignment should be okay.
Comment #10
dleeward commentedI tried what skstarkiller suggested in #5 and it gets rid of the default centering, but now it will not display centered text in the edit window.
Any other suggestions?
Comment #11
simplyrahul commentedThe suggestion in #5 actually worked and is pretty simple.
I would definitely suggest that. And personally I do not think it may affect your theme. Other methods may affect the theme look.
Regards,
Rahul
Comment #12
colorado commentedComment #13
dleeward commentedCan you explain your reasoning setting status to "By design"?
Comment #14
zlex commentedhaving the same issue. Applying the fix leads the text being forced left.
Comment #15
zlex commentedLooks like the left-align issue must be a problem with the FCKeditor css. I didn't bother to fix it, I just had it point to the Garland theme's style.css
Comment #16
kjshaw commentedThis worked for me in Tapestry using theme.css. It even fixed the problem that text would not appear centered or right-justified in the editor window. I'm very happy now!:
http://drupal.org/node/432090
Comment #17
James T H commentedI had a similar issue with a customised Zen theme on Drupal 6.2. I think the problem lay with the absence of any "style.css" file, so I selected "define css" in the FCKEditor CSS settings and manually entered the CSS files I am using. The problem seems to be solved for me in this way.