RTE HTMLarea

3.9. FAQ: Is it possible to style the appearance of links in the RTE itself?

«In the front end, all links are rendered correctly, but in the RTE itself the links are shown in standard color (blue) with underline, except links I've already visited. These are in black with underline and a hover effect. If I add new links, it's the same: Visited links become black, unvisited blue. The rest of the style sheet is parsed without problems. Any hints?»

This is a Mozilla/Firefox feature. In the editing area, the link attributes defined in the browser user profile take precedence over the corresponding attributes specified in your style sheet. Apparently, these preferences cannot be neutral.

In an editing area displayed by Internet Explorer, the style sheet specification is applied to the link.

You can force (not only) Firefox to take your style sheet rather than the user preference settings via the !important rule. Check this out for example:

  a:link, a:visited{
      text-decoration:none !important;
      color:#c00 !important;
  }

Now your links should turn red and the text-decoration should be gone. If you are using the same style sheet in the frontend and in the RTE, you can avoid forcing your link style on all frontend users by restricting it to the RTE editing area. Using the same example as above:

  .htmlarea-content-body a:link, .htmlarea-content-body a:visited {
      text-decoration:none !important;
      color:#c00 !important;
  }

To top


Valid XHTML 1.0!