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.

Customising the CMS /

TinyMCE customizing


Reply


2 Posts   477 Views

Avatar
Glennrf

Community Member, 1 Post

13 August 2012 at 5:52am

Edited: 13/08/2012 5:52am

I'm new here so I am not sure if this is the place for this question.

All I am trying to do is add a couple of new options to the "Format" drop down list for example I would like to add <Div> and <Span> options to the list. Ideally, I would like to add things like Red Box which would create a Div tag with a class= redbox, which I have defined in my typography.css file and in my editor.css file.

I can get redbox to show up in my "styles" drop down, but it defaults to a <P> tag.

I also have a box style that I use to create a 3 column box layout ie.

box1{
float:left;
width:225px;
}
box2{
float:left;
width:225px;
}
box3{
float:right;
width:225px;
}
After box3, I need to add a <div style="clear:both"></div>

Is there anyway to do this in the editor?

Thanks in Advance
Glenn

Avatar
Steeloctopus

Community Member, 4 Posts

24 April 2014 at 12:45pm

For SS 3.1 you can manipulate the Format drop down by changing the following line in the _config.php

HtmlEditorConfig::get('cms')->setOption('theme_advanced_blockformats', 'p,div,address,pre,h1,h2,h3,h4,h5,h6,div,span');