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.

Template Questions /

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

format in cms


Go to End


4 Posts   1596 Views

Avatar
servalman

Community Member, 211 Posts

15 September 2009 at 8:43pm

Hello

I want to now where I can find ressources to do the following :

- Is it possible to add new format in the cms in the "Edit Page pane"
I know it must have to do with css settings but I wanted to know the best way to do it

Thank you

Avatar
mschiefmaker

Community Member, 187 Posts

15 September 2009 at 9:19pm

in the editor.css add something like

body.green_highlight{
font-weight: 500;
color:#537335;

}

This will give you an additional option green_highlght in the styles dropdown in the edit bar in the CMS

Cheers

MM

Avatar
servalman

Community Member, 211 Posts

16 September 2009 at 1:33am

thanks for your answer.

One other question what is the difference from using the typography.css file ?

Thank you

Avatar
mschiefmaker

Community Member, 187 Posts

16 September 2009 at 5:45pm

Edited: 16/09/2009 5:47pm

Sorry I forgoten you need to edit the HTMLEditorField.php file. There is a section commented out at line 280
/*new HtmlEditorField_dropdown("mceSetCSSClass", "styleSelect", array(
"mceContentBody" => "mceContentBody",
)),*/
Remove the comments to this.

In terms of you second question, check out this thread. [url= http://www.silverstripe.org/archive/show/186128#post186128]
Will covers it off well