FCKeditor Integration - important tweaks


Author Message
Todd Humphrey

Posted: 6/2/2009
Quote message 

I came across a couple of changes I needed to make to all templates out of Artisteer to make them work well with FCKeditor. Seeing as I need to make these changes to ALL templates coming out of Artisteer which will need FCKeditor, I figured I would 1) help others working on the same problem, and 2) see if these changes could be made in the program so I don't have to change the CSS files everytime.

1) The link style colors were not being used by FCKeditor, and links were appearing blue. In Firebug, the correct styles were present, and not overridden, but they were simply not being used for some reason.

Solution: add !important to a{} color styles effects.

a {
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, Sans-Serif;
text-decoration: none;
color: #3F7231 !important;
}


I did this for the regular a, I suppose it could be added to a:link, a:visited, and a:hover as well, but I didn't find it necessary. I do not believe adding this into the program will mess anything up for anyone, and will definitely help those who are trying to integrate FCKeditor.

2) The only place where the background color where the content is at is present in the styling is in .Sheet-cc. In FCKeditor, if you apply this class to the text editor box, it also inherits any other styles on Sheet-cc.

Solution: make a class with ONLY the background color present, which would then allow FCKeditor to use that style for the background color without inheriting undesired styles.

current .Sheet-cc

.Sheet-cc
{
position:absolute;
z-index:-1;
top: 21px;
left: 21px;
right: 21px;
bottom: 21px;
background-color: #FEF2DD;
}


Adding an additional class with only the background color:

.fckeditor-background{
background-color: #FEF2DD;
}


This is then referenced in fckeditor.config.js with this line:
FCKConfig.BodyClass = "fckeditor-background";


Like I said before, I hope that these 2 small changes can make their way into Artisteer!
 
Todd Humphrey

Posted: 6/2/2009
Quote message 

Well apparently the !important thing isn't such a good idea... It changed the admin_menu for me, and I'm assuming it would create other undesirable changes.

I found a related thread about the blue links:
http://drupal.org/node/435994
 
Pietro Cappai

Posted: 11/5/2010
Quote message 

Hi,
the tweak for background-color works with IE only and not with firefox, opera, chrome... other browsers. Do you know why?

Quote Todd Humphrey:

I came across a couple of changes I needed to make to all templates out of Artisteer to make them work well with FCKeditor. Seeing as I need to make these changes to ALL templates coming out of Artisteer which will need FCKeditor, I figured I would 1) help others working on the same problem, and 2) see if these changes could be made in the program so I don't have to change the CSS files everytime.

1) The link style colors were not being used by FCKeditor, and links were appearing blue. In Firebug, the correct styles were present, and not overridden, but they were simply not being used for some reason.

Solution: add !important to a{} color styles effects.

a {
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, Sans-Serif;
text-decoration: none;
color: #3F7231 !important;
}


I did this for the regular a, I suppose it could be added to a:link, a:visited, and a:hover as well, but I didn't find it necessary. I do not believe adding this into the program will mess anything up for anyone, and will definitely help those who are trying to integrate FCKeditor.

2) The only place where the background color where the content is at is present in the styling is in .Sheet-cc. In FCKeditor, if you apply this class to the text editor box, it also inherits any other styles on Sheet-cc.

Solution: make a class with ONLY the background color present, which would then allow FCKeditor to use that style for the background color without inheriting undesired styles.

current .Sheet-cc

.Sheet-cc
{
position:absolute;
z-index:-1;
top: 21px;
left: 21px;
right: 21px;
bottom: 21px;
background-color: #FEF2DD;
}


Adding an additional class with only the background color:

.fckeditor-background{
background-color: #FEF2DD;
}


This is then referenced in fckeditor.config.js with this line:
FCKConfig.BodyClass = "fckeditor-background";


Like I said before, I hope that these 2 small changes can make their way into Artisteer!


 
Pietro Cappai

Posted: 11/5/2010
Quote message 

Hi,
I've found the solution at http://drupal.org/node/209482 and it's really simple.O:)

You need to add another line in fckeditor.config.js:

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