[ewiki] Re: table markup: small addition: colspan
- From: Mario Salzer <mario@xxxxxxxxxxxxx>
- To: ewiki@xxxxxxxxxxxxx
- Date: Thu, 26 Feb 2004 18:37:51 +0100
Hey Timm,
> | this | is | a |
> ||| table |
> | yes || indeed |
This looks complicated to achieve, but I could think of doing it
with a post-format plugin, which simply counted the empty
<td></td>'s and merged a number into the following <td>, if
possible.
$ewiki_plugins["format_final"][] = "evil_table_rowspan":
function evil_table_rowspan(&$html) {
$html = preg_replace(
'#(<td></td>\s*)+<td#e'
'"<td rowspan=\"" . (1+(int)(strlen("$1")/9)) . "\">"'
"$html"
);
}
> +------+----+---+
> | this | is | a |
> +------+----+---+
> | table |
> +------+--------+
> | yes | indeed |
> +------+--------+
> Have you thought of implementing it?
;) There is in fact support for converting ASCII-art tables,
like the one above. (But it lacks row and colspan support,
else it would only work with machine-generated tables.)
>
> Have you seen intuitive rowspan-markups?
Almost everything other WikiWare does in respect to tables,
involves some special chars after each | dash.
Personally I'd really recommend using plugins/markup/htmltable
for things which are almost layout-tables. It is safe (filtered
attributes) and also easy to use, with little disturbtion of
the surrounding text:
<table>
<tr><td> one <td> two <td> three </td>
<tr><td> second <td> row <td> here
<tr>
<td rowspan=3> last line </tr>
</table>
It's not fully finished (has a few bugs), though.
mario
- Follow-Ups:
- [ewiki] CVS Up! Liveuser plugins updated
- From: Andy Fundinger
- References:
- [ewiki] table markup: small addition: colspan
- From: massenmensch
Other related posts:
- » [ewiki] table markup: small addition: colspan
- » [ewiki] Re: table markup: small addition: colspan
- [ewiki] CVS Up! Liveuser plugins updated
- From: Andy Fundinger
- [ewiki] table markup: small addition: colspan
- From: massenmensch