Page 1 of 1

Changing/removing link color in WYSIWYG-editor

Posted: Wed May 23, 2007 11:27 am
by xGrape
I use CSS to style all links on my site, but whenever I add a link (url, email) on a page with the WYSIWYG editor, it applies this code to it:

Code: Select all

<font color="#0066cc"></font>
I know I can remove it if I change to source view, but the client who will be using the site would be happy if he could do it all in WYSIWYG. Any way to remove this addition (or change the color to match the one in the CSS) for good?

Re: Changing/removing link color in WYSIWYG-editor

Posted: Wed May 23, 2007 3:38 pm
by Anastasis
I haven't had a problem with this. Are your 'a' links specified globally as part of a separate stylesheet? The one I am currently working on has them defined as this:

a:link, a:visited {
font-weight: bold;
color: midnightblue;
}
a:hover {
font-weight: bold;
color: maroon;
}

at the top of the CSS list in my main stylesheet which all my CMSMS templates use.

I am using the TinyMCE editor. If you drop down the Styles combo in your editor do you see your CSS class styles listed?

Re: Changing/removing link color in WYSIWYG-editor

Posted: Wed May 23, 2007 8:52 pm
by xGrape
Hmm, it could be because I use an external stylesheet (not within CMSMS)... oh well, no biggie I guess...

Re: Changing/removing link color in WYSIWYG-editor

Posted: Wed May 23, 2007 11:00 pm
by Anastasis
xGrape wrote: Hmm, it could be because I use an external stylesheet (not within CMSMS)... oh well, no biggie I guess...
I'm sure that will be it. For styles to be recognised in the editor you need to add a stylesheet to CMSMS and associate it with your template. Make sure you also have the {stylesheet} tag in your template

It will still work just as a regular external stylesheet, but the benefit will be the styles will be available and functional in the editor rather than any default styles the editor has.