Forum closed. New forum available at http://community.wymeditor.org/

CSS Classes for titles ?

Support forum for WYMeditor.

CSS Classes for titles ?

Postby Fifi on Mon Sep 28, 2009 1:37 pm

Hello,

I have submitted this question in the french forum, no answer... the forum looks like dead.

Does anybody knows how can I add some CSS classes for the titles h1, h2...
To add some CSS option, I edit the file jquery.wymeditor.js :
Code: Select all
classesItems:      [{'name': 'rouge', 'title': 'paragraphe rouge', 'expr': 'p'},
                  {'name': 'gris', 'title': 'paragraphe gris', 'expr': 'p'},
                  {'name': 'gris', 'title': 'titre 2 gris', 'expr': 'h2'},
                  {'name': 'gris', 'title': 'titre 3 gris', 'expr': 'h3'},
                  {'name': 'gris', 'title': 'titre 4 gris', 'expr': 'h4'}],

The CSS file contains the styles "rouge" and "gris" (color red or gray for paragraph or title).
The CSS's classes appear near the WYMeditor field, I can apply the style for the paragraph, but it doesn't work with the title h2, h3, h4...

Can anybody help me ?
Fifi
 
Posts: 32
Joined: Mon Nov 05, 2007 10:06 am

Re: CSS Classes for titles ?

Postby Fifi on Tue Sep 29, 2009 9:07 am

♪♫ Is there anybody out there ? ♫♪ :roll:
Fifi
 
Posts: 32
Joined: Mon Nov 05, 2007 10:06 am

Re: CSS Classes for titles ?

Postby mr_lundis on Mon Oct 05, 2009 3:27 pm

Hi!
Don't add the same class several times over, instead modify the class expression to allow more than one kind of element.
Code: Select all
classesItems:      [{'name': 'rouge', 'title': 'rouge', 'expr': 'p'},
                  {'name': 'gris', 'title': 'gris', 'expr': 'p, h2, h3, h4'}],


Cheers! ;)
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron