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

Add button text-aligh

Support forum for WYMeditor.

Add button text-aligh

Postby cocbay on Tue Jul 21, 2009 7:30 am

Hi,
How I add a button "text-align" (left, right, justify) on the toolbar?
Thanks.
cocbay
 
Posts: 3
Joined: Wed Jul 08, 2009 10:01 am

Re: Add button text-aligh

Postby seanb on Thu Jul 30, 2009 4:04 am

If anyone has any info on this I would also like to see it... thanks!
seanb
 
Posts: 1
Joined: Thu Jul 30, 2009 4:03 am

Re: Add button text-aligh

Postby Nico on Fri Jul 31, 2009 4:16 pm

Hi,

You don't really need to insert a button : You should use the "Classes" selectbox to do this kind of changes.

Setting "text-align" property in a text is a design problem, not a content definition problem. This means it's not Wymeditor's job to set text-align.
But Wymeditor's job is to define content's semantics. So with wymeditor, you define classes to contents, and than these classes are translated to design with CSS.

To use the Classes functionality, you should refere to the basic wymeditor integration exemple : In the wymeditor's call, you define the CSS file in wich classes are defined with the "stylesheet" argument.

In your CSS file than you define something like this :

Code: Select all
/* Align right */
.alignRight /* p[class!="alignLeft"][class!="alignCenter"] */ {
    text-align: right;
/*
    text-align: right;
*/
}
/* Align center */
.alignCenter /* p[class!="alignLeft"][class!="alignRight"] */ {
    text-align: center;
/*
    text-align: center;
*/
}


Nico
Nico
 
Posts: 19
Joined: Tue Jun 23, 2009 6:49 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests

cron