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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Themes /

Discuss SilverStripe Themes.

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

CSS: coordinating page classes with tinymce display


Go to End


2 Posts   3266 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, 5523 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)