TinyMCE : Customs Formats

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
musicscore
Power Poster
Power Poster
Posts: 444
Joined: Wed Jan 25, 2006 11:53 am
Location: Netherlands

TinyMCE : Customs Formats

Post by musicscore »

Hey there.

I want to add custom formats in TinyMCE.
So I selected "at a custom formats dropdown" in the settings of TinyMCE and added this code :

Code: Select all

Paragraph=p;Header 1=h1;Header 2=h2;Header 3=h3;Header 4=h4;Header 5=h5;Header 6=h6

This works perfect but now my problem.

I also want to add a div with the class "color-gold" and a div with the class "color-black".

So I added ";Color-cold=div" add the end of the previous code but how do I enter the class (color-gold and color-black) ?

Please help. TIA.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: TinyMCE : Customs Formats

Post by DIGI3 »

Under the CSS tab in TinyMCE settings, add the following to the "Style formats" box:

Code: Select all

title: 'Gold', block: 'div', classes: 'color-gold'
title: 'Black', block: 'div', classes: 'color-black'
Then your editor will see these options under Format > Formats, or you can add the styleselect button to the toolbar. This will add the div wrapper and the corresponding class to the selected block.
Not getting the answer you need? CMSMS support options
Post Reply

Return to “Modules/Add-Ons”