Hi folks,
I use the sylesheetparser plugin to load some css files into CKEditor. This works great, but here is where I bump my head:
The hirachie of the css may not be replicated inside CKEditor. In the final page I may have something like this:
<div class="ckeditor_content">
<?php print( $text_edited_with_CKEditor ); ?>
</div>
in the css the styles to be used by CKEditor are all below in herarchie of .ckeditor_content like
/* css snippet */
.ckeditor_content > h1 {
color: #123456;
}
In CKEditor there is no <div class="ckeditor_content"> ... </div> therefore the styles are not applied. And the preview inside CKEditor is poor. :( if I add the div in CKEditor everything looks great, but I have a double output in the frontend with <div class="ckeditor_content"><div class="ckeditor_content"> ... </div></div>
Now, before I start rewriting the whole css, or the frontend. I'd like to know if there might be a config for CKEditor to pass an enlosing structure to the editing area.
Or maybe you know of a diffrent solution that would save me from major remodeling.
Regards
Armin

I fixed it by including the
I fixed it by including the <div> container in the CKeditor and edited the rest of the layout to not include it there.
Would be nice to know anyways, if there is a way to put the CKEditor Content into a specific css-context.
Regards
Armin
use the bodyClass option to
use the bodyClass option to specify that class for the body and then your stylesheet will work
Perfect solution
Hi alfonsoml,
thank you for the reply. I only read through config.bodyClass but it sounds like the perfect solution to the problem I described. I will try it if I find the time.
Regards
Armin