Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Themes /

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

CSS: coordinating page classes with tinymce display


Reply


2 Posts   2137 Views

Avatar
billyb

Community Member, 1 Post

14 February 2009 at 2:58am

Hi all,

I'm trying to find a why to coordinate the display of page classes which have their own stylesheet with the wysiwyg editing of page instances of those classes.

For example: following the tutorial I've created an ArticlePage, with it's .ss template and .php class. Following this thread (
http://www.silverstripe.org/archive/show/59153) I've adding this to my class:

function init() {
parent::init();
Requirements::themedCSS('ArticlePage');
}

which very nicely pulls in my ArticlePage.css file for my theme. But in admin mode, non of these styles are applied within the content editor, so my users will be seeing something very different from what renders.

Tinymce is clearly pulling in the themes typography.css. How can we get it to look to the page classes specific Requirements?

Cheers,

-Bill B

Avatar
Willr

Forum Moderator, 5513 Posts

16 February 2009 at 2:08pm

You can't really. TinyMCE will only pull styles from editor.css (this imports typography.css in most themes)