ckeditor - how to get custom-css with id to work?

Tags: css,ckeditor

Problem :

Silly it seems, but can't get this to work:

css (custom.css):
#thePage h2 {color:#f00;}


the ck-config, in container-html:
CKEDITOR.replace( 'editor1',{
  bodyId : 'thePage',
  contentsCss : 'custom.css',

If #thePage is removed it works, but id required for the purpose. What am I missing here?


Solution :

For some reason, bodyId seem to require regular js,

<script type="text/javascript">
if ( window.CKEDITOR ) {
window.CKEDITOR.config.bodyId = 'thePage';

And browser-caches can be a pain..


    CSS Howto..

    How set a page to maximum and minimum sizes via css

    How to remove text flicker in CSS?

    How to use jquery function on numbers separated by .(dot) or ,(comma) as thousands separator

    codaSlider hack - how do I add little triangles overlaying an image

    How to color the first word using CSS

    HTML code to show splitted data_frame in one html page using python

    CSS: can't understand how to work with the z-index

    How to create folder style in CSS

    HTML/CSS How to make menu slide up when menu item is clicked?

    How do I make a table show a vertical scroll bar without explicitly setting the height?

    How to stretch container div from header to footer with html/css?

    how to position an element right below an “absolute” div?

    CSS How to change 3 line (menu icon) color when hover

    How to change just the css inside a DIV and not anywhere else?

    How to download custom font for users who don't have it? [duplicate]

    Am centering content vertically using css, how to remove empty space?

    How can I get to see the full image in the background?

    How to add separate style to google.visualization.DataTable without changing its own styles

    How to write conditional css?

    Text is too close to scroller. How to create a little bit space between scroller and text?

    How to center my menu bar with css. (I am using Microsoft Expression Web 4)

    How to change css on link current class

    CSS - How to float correctly into pseudocolumns

    How to show a message box on center of screen?

    html, svg, css how to make mouse event not fire on transparent color

    How to display vertical text in table headers with auto height / without text overflow?

    How to generate a source map for minified CSS generated by dotless

    How make contents as a grid in a ScrollPanel in GWT project using UIBinder

    How to make element fade in on page scroll?

    Best practice: How to use (repeat) CSS style attributes correctly?