Question

I'm creating a theme with Diazo for plone4. I noticed that TinyMCE when in edit mode doesn't respect the style of the site. It seems more "raw" with basic font and header style (h1, h2, etc).

What's wrong?

Thank's

Was it helpful?

Solution

TinyMCE sets up the content to be edited in an iframe and loads a stylesheet called @@tinymce-getstyle, which is actually a browser view that includes the stylesheets that are registered in portal_css.

I've had the most success with Diazo when I register my stylesheets in the Plone stylesheet registry (portal_css), and then add Diazo rules to copy them into the head of my theme.

Disadvantage:

  • You can no longer edit the theme on its own apart from running via Plone.

Advantages:

  • The stylesheets are automatically merged and compressed.
  • TinyMCE can load the styles.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top