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.

Content Editor Discussions

Forum for content editors and CMS users.

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

Tiny MCE content CSS


Reply

2 Posts   1804 Views

Avatar
monn

19 January 2010 at 4:51pm Community Member, 1 Post

Hi guys,

I've had a search around for this, and while I've found information none of it seemed to either work or be applicable.

All I want to be able to do is have 'typography.css' and 'layout.css' included in the content editor, Tiny MCE. Now from what i read this should happen by default, and is the intended usage, having these 2 CSS files included in both the content editor and the front end to maintain consistency.

Before I understood this I removed some references to these files thinking i didnt need them, instead favouring my own naming/method for CSS. So the question is how do I get them back in the content editor? I thought they might have been magically included in the content editor when either doing the old style of CSS inclusion in a page type:

Requirements::themedCSS("layout");

or the newer way, <% require themedCSS(hiive) %>

Neither of these seems to have any affect on whats included in to the content editor, so id assume there is a config file or sorts for tiny mce that controls this, I've looked but haven't found anything.

Thanks.

Avatar
Devlin

20 January 2010 at 3:36am Community Member, 215 Posts

Hi,

You might want to try:

HtmlEditorConfig::get()->setOption('content_css',project().'/css/typography.css, '.project().'/css/layout.css');

[url]http://doc.silverstripe.org/doku.php?id=htmleditorconfig[/url]