SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1
Topic [resolved] is editor.css used? 2562 Views

[resolved] is editor.css used?

4 November 2013 at 9:37am Last edited: 16 November 2013 3:10pm

Hi,

I could not get editor.css to work as it would be expected to work in a standard SilverStripe installation. Is it not used in SilverCart or should I figure out I what I could have done wrong while trying to utilize it?

Thanx in advance
Szabesz

Re: [resolved] is editor.css used?

5 November 2013 at 12:26pm

Hi Szabesz,

the editor.css should work with or without SilverCart installed. SilverCart does nothing to manipulate the editor.css handling.

To get your editor.css into the CMS, it should be located like this:
/PROJECT_NAME/css/editor.css
(While PROJECT_NAME is the value set into the global variable $project in your /mysite/_config.php)
OR when using a custom theme:
/themes/THEME_NAME/css/editor.css
(While THEME_NAME is the value set as your custom theme - for example: SSViewer::set_theme('THEME_NAME'); - in your _config.php)

Best Regards
Sebastian

Re: [resolved] is editor.css used?

5 November 2013 at 12:35pm

Hi Sebastian,

Thanx for the reply! In this case I must have done something wrong. I'm going to further investigate what could have gone wrong.

Best Regards
Szabesz

Re: [resolved] is editor.css used?

16 November 2013 at 1:53pm

Hi Gábor,

any updates on this or may I mark it as resolved?

Cheers
Ramon

Re: [resolved] is editor.css used?

16 November 2013 at 2:23pm Last edited: 16 November 2013 2:23pm

Hi Ramon,

I haven't got time to investigate this too much, but in my case 'mysite/css/editor.css' is certainly not loaded automatically. So I used the "content_css" option set in _config.php, like this (among other settings):

HtmlEditorConfig::get('cms')->setOptions(array(
'content_css' => 'mysite/css/editor.css',
));

So I think you can mark it as resolved, since anyone having the same issue should be able to overcome it this way.

Thank you!
Szabesz

Re: [resolved] is editor.css used?

16 November 2013 at 3:35pm

Hi,

the 'mysite/css/editor.css' won't be loaded automatically by the cms module without telling it that the current project is called 'mysite' (LeftAndMain::init()).

You need this inside your /mysite/_config.php:

global $project;
$project = 'mysite';

Did you do that?

Best Regards
Sebastian

Re: [resolved] is editor.css used?

16 November 2013 at 3:44pm

Hi Sebastian,

Yes, my _config.php starts with it, as it is included in the default setup and did not modify it. So I really do not know what is going on, but since explicitly defining it works, I can live with it :)

Best Regards,
Sebastian