Topic: Overriding CSS for TinyMCE in Kea

Topic type:

Info from Bob on how to use javascript to insert a CSS file for a page that's got TinyMCE formatting issues in IE6&7

Hi Dean

In the past when I've had this problem I've done this:

in the <head> of the page that has the problem I've added

<script type="text/javascript">

// this is to find out if there are any iframes on the page
var hasIframe = parent.document.getElementsByTagName("iframe");

if(hasIframe.length > 1) {
   // if so - then you are mostlikely in the kea edit mode (2 iframes)
   //  add this css link
   document.write("<link rel='stylesheet' href='/includes/css/in-editor.css' type='text/css' />");


and then had a in-editor.css with overriding styles for the page (often just turning things off -making it simplier)





Also kinda related to this is if you want the tinymce to have certain styles in a dropdown style list to choose from you need to do this:

you can create a file in any kea site called


you can put styles in it that appear in the styles dropdown in the tinyMCE editor

if you want the styles to also work live you need to either put them into a css file that gets triggered live or have the /includes/css/rte_styles.css included into the html pages


Discuss This Topic

There are 0 comments in this discussion.

join this discussion

Other Resources

Results via DigitalNZ

Powered by