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:
=================================
...
//<![CDATA[
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?

regards,/t



Solution :

For some reason, bodyId seem to require regular js,

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

And browser-caches can be a pain..

regards,


    CSS Howto..

    How to make a text with skewed line but not letters?

    How to position a vertical menu as nested
      under horizontal parent

    How can i get spaces between images with the same class?

    How to make a header ribbon responsive

    page breaks and css - how to skip last page?

    How to style radio button or checkbox inside a bootstrap table?

    Selenium how to access two controls of same css class

    How to have dynamic image as CSS background?

    Nine divs in columns. How to design this?

    How can I change my div box to a link?

    how to create divs rowwise in css

    how to fix this horizontal list on Chrome and Opera?

    How to force my text to not break into lines in css?

    How do I make my webpage scale-able depending on the size of the browser window?

    How to override css for giving background image?

    How can write a CSS style for a parent class?

    How can I find out what CSS is needed to implement twitter Bootstraps Modal. [closed]

    How to hide part of css when input is empty?

    How to disable button using jquery in materialize css

    How to stop a webpage from loading until all jQuery load functions are complete?

    How to avoid wrapping in CSS float

    How to make css background-image a fluid image work in IE

    CSS - How to break a line only at division borders

    how to compute Facebook graph api cover offset_y to pixel?

    Overlay image to show like panorama [closed]

    How to apply CSS(background image) to radiobutton when it clicks?

    How is it possible to align css sprites horizontally?

    How do I make an image only overflow (hidden) on the bottom if it exceeds it's container div?

    How can I prevent wild scrolling when a fixed position text input form field gains focus?

    How to maintain page backgroud image zoom fixed? CSS