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 How to change style in editor 2473 Views

How to change style in editor

31 October 2012 at 12:21am

Hi all,

I need to change the character style in the editor...

I use this guide: http://www.clickheredigital.co.uk/blog/adding-more-custom-css-style-classes-to-silverstripe-cms-wysiwyg/

so in the folder mysite/css, I create two files:
1) editor.css where I have inserted the following code:
.head {color: #00ff00; font-variant: small-caps;}
.head2 {color: #0000ff; font-style: italic; }
.head3 {color: #ff0000; font-weight: bold;}

2) typography.css with this code:
.typography .head {color: #00ff00; font-variant: small-caps; }
.typography .head2 {color:#0000ff; font-style:italic;}
.typography .head3 {color:#ff0000; font-weight: bold;}

With this I find the new styles in the dropdown menu as in the image below

but even if I flush the cache I don't see the changes in the frontend as below:

As you can see in the firebug window the code is:
<h1 class="head3">prova2</h1> but on the right there is not any reference to .head3 class...

I'm trying at least three hours making changes... searching some solution (Google rules) but I can't find anything that help me to solve it.

Have you something to do about this?

I hope you reply soon!

Thanks

Bye

Papipano

Re: How to change style in editor

31 October 2012 at 10:10am Last edited: 31 October 2012 10:22am

Hi Papipano,

you can check the manual for information about theming and customizing SilverCart.
http://1-3.doc.silvercart.org/doku.php/silvercart:10_techbase:10_develop:10_theming
SilverCart comes with it's own CSS-Framework, so the changes you want to make have to be in other files - they should go into "content.css"

Hope this solves your issue.

Ciao
Ramon

Re: How to change style in editor

31 October 2012 at 1:00pm

Ciao Ramon, thanks for the reply.

I have already read the manual section about changing the style in Silvercart, but I haven't any result...

I try to explain better:

As you tell me in the previous post, I copy the content.css in mysite/css/screen (to overload the default one) and I edit it with the same style declaration:

.head1 {color: #00ff00; font-variant: small-caps;}
.head2 {color: #0000ff; font-style: italic; }
.head3 {color: #ff0000; font-weight: bold;}

but neither after ?flush=all the style is applied.

So I modify some style declaration in the content.css file and nothing has changed...

Maybe my problem is that the manifest builder doesn't make changes in the styles file, like base.css content.css and content-ec.css stored in asset/_combinedfiles; I think this cause some changes in various css file doesn't modify that files.

Is this thought correct? And how can I help the manifest builder to make the changes?

Thanks in advance.

Bye

Max

Re: How to change style in editor

31 October 2012 at 8:20pm

Hi Max,

have you set

define('SS_ENVIRONMENT_TYPE', 'dev');

in your _ss_environment.php ?

Ciao
Ramon

Re: How to change style in editor

2 November 2012 at 4:37pm

Ciao Ramon, thanks for the reply...

I set the variable:

Director::set_environment_type("dev");

and the it gave me a warning about the permission denied in requirement-engine/cache.

I set the permission to 777 and I haven't got the error back.

I hope you add this setting in your Silvercart's system requirements docs.

Thanks for everything!

Bye

Max