CKEditor Editorarea styles

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
8/18/2011 8:30:29 AM
Gravatar
Total Posts 133
J

CKEditor Editorarea styles

Where does CKEditor get the styles it shows when editing - that is the general editor area styles not the styles dropdown. At the moment mine seems to pick up some styles that match the finished page but many that are way off. For example a bulleted list does show the theme's bullets but with the wrong font and font size. Ordered lists have the wrong font,size and no indent in the CKEditor. Both display correctly on the site.

This is true in both FF and Chrome. 

I have been trawling through the source and searching on here but I cannot get a handle on how the Editor gets its CSS.

Cheers

John

8/18/2011 10:29:22 AM
Gravatar
Total Posts 18439

Re: CKEditor Editorarea styles

the editor loads the same css as any other page but it is not in the same context depending on what kind of selectors are used to style the lists those selectors may not be in context in the editor.

For example in Artisteer skins there may be selectors like this to style lists:

.art-blockcontent-body ul li { }
.art-post ol, .art-post ul{}
.art-post li {}
.art-post li ol, .art-post li ul {}
.art-post ol>li { }

but those selectors are not in context in the editor because the editor is just article content html inside an iframe it doesn't have the containers around it with those classes like it will have when viewed in the page.

So it requires some additional CSS to style them the same in the editor, you can harvest the style rules from those selectors and then put the same rules in a new selectors like:

body.wysiwygeditor ul li { }

Hope that helps,

Joe

 

8/19/2011 3:58:15 AM
Gravatar
Total Posts 133
J

Re: CKEditor Editorarea styles

Thanks Joe - that is just what I needed - I did read it somewhere in the docs/forums a while ago but didn't bookmark it and couldn't find my way back. 

J

You must sign in to post in the forums. This thread is closed to new posts.