Default paragraph style for cell body

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
fchan
Propeller Head
Posts: 47
Joined: Fri Aug 31, 2012 11:41 am

Default paragraph style for cell body

Post by fchan »

Is there a way to specify that a particular paragraph style be the default style used in the body of a table? Currently I have to use "Cell Content Style" to apply the paragraph style but would like the cell to default to the p style.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Default paragraph style for cell body

Post by LTinker68 »

There is a way to have a paragraph tag always follow a td tag (in theory, never tried it), but I strooooongly don't recommend it. The reason... There are a LOT of Flare effects that do use or could use a table structure, and setting up a <p> to always follow a <td> would seriously screw those up. The caveat is if you're ok with always applying a class to the table tag in the topics -- that would differentiate a table in a topic from tables created by Flare to support one of its features.

Again, I have not tried this, but in theory, you would set up something like this in your stylesheet:

Code: Select all

table.myTableClass td
{
   mc-next-tag: p;
}
If that doesn't work, it could be because the first line makes it a complex selector and it might not work with complex selectors. In which case, I don't think there would be an easy way to do it using CSS.

The other suggestion would be to create a dummy table with paragraphs in a snippet, insert the snippet in a topic, then convert the snippet to text in the topic so you can edit it.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
cbdebris
Sr. Propeller Head
Posts: 105
Joined: Wed Aug 15, 2007 4:15 pm
Location: California

Re: Default paragraph style for cell body

Post by cbdebris »

You might consider a complex selector just for the table (yes, you have to have a class for the table and the paragraph). I use that and it's worked great.
Post Reply