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

how to assign some class to multiply tags at once ?

Support forum for WYMeditor.

how to assign some class to multiply tags at once ?

Postby gregg128 on Fri Jan 26, 2007 12:33 pm

is there a way to assign some class to multiply <td> tags at one time ?

I have created my stiles and than "hardcoded" them to editor.html:

<h3>TD</h3>
<a href="#" name="td" onclick="setClass('important','TD','','*');getCleanHTML();return false;">Red1</a>

But i still need to manually select EVERY <td> in my kilometer-long row to assign my class to it.

Thanks in advance.
gregg128
 
Posts: 6
Joined: Fri Dec 01, 2006 10:51 am

Postby jfh on Mon Jan 29, 2007 11:31 am

You could use templates, which are described at Documentation: Customization.

You can define a template which will insert a table where the classes are already applied to the cells.
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Postby gregg128 on Tue Jan 30, 2007 8:01 am

Thank you!
I have already found some solution:

table.t2 {background-color:#eaeaea; border:3px #FFFFFF solid;
margin:1px;border-collapse: collapse;}
table.t2 tr td {border:1px #FFFFFF solid;padding:5px;}

table.t2 td:first-child {text-align: left;} /* First cell aligment for FF and Opera.*/
table.t2 td:first-child + td {text-align: right;} /* Second cell aligment for FF and Opera.*/

html>body table.t2 td {text-align: center;} /*Cell aligment, hidden from IE. Aligment for IE should be placed direct to <col> for example <col align="xxx" valign="yyy"> */

table.t2 th.th1 {border:1px #FFFFFF solid;padding:5px;
background-color:#89333c; color:#FFFFFF;}
table.t2 th.th2 {border:1px #FFFFFF solid;padding:5px;
background-color:#979797; color:#FFFFFF;}
table.t2 tr td.h1 {background-color:#89333c; color:#FFFFFF;}
table.t2 tr td.h2 {background-color:#979797; color:#FFFFFF;}
table.t2 col.colr1 {background-color:#f3eaeb; border:1px #FFFFFF solid;}
table.t2 col.colr2 {background-color:#e7d6d8; border:1px #FFFFFF solid;}
table.t2 col.colr3 {background-color:#d0adb1;border:1px #FFFFFF solid;}
table.t2 col.colr4 {background-color:#b8858a;border:1px #FFFFFF solid;}

Etc, etc, etc.

It's not a great solution, but it works :)
gregg128
 
Posts: 6
Joined: Fri Dec 01, 2006 10:51 am


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests