Changing/removing link color in WYSIWYG-editor

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
xGrape

Changing/removing link color in WYSIWYG-editor

Post 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?
Anastasis

Re: Changing/removing link color in WYSIWYG-editor

Post 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?
xGrape

Re: Changing/removing link color in WYSIWYG-editor

Post by xGrape »

Hmm, it could be because I use an external stylesheet (not within CMSMS)... oh well, no biggie I guess...
Anastasis

Re: Changing/removing link color in WYSIWYG-editor

Post 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.
Locked

Return to “Layout and Design (CSS & HTML)”