I am using ckeditor and divarea plugin so that I can use ckeditor in div not in iframe.
So the ckeditor can inherit the page's css style.
Now I want set the style of ckeditor's content.
One solution is like this:
.cke_contents h1 {
font-size: 32px;
/* custom styles */
}
.cke_contents p {
font-size: 12px;
/* custom styles */
}
I'm afraid this may cause other issues. So what I'm thinking is to set a class name so that I can set custom styles freely. like this:
<textarea id="ckeTextblock"></textarea>
<script>
CKEDITOR.replace("ckeTextblock", {
extraPlugins: 'divarea',
bodyClass: 'customClassName'
})
</script>
.customClassName h1 {
font-size: 32px;
/* custom styles */
}
.customClassName p {
font-size: 12px;
/* custom styles */
}
That I have tried the "bodyClass" config, but it not worked in divarea.
Anyone has any idea? Thanks!