Closed yatesco closed 8 years ago
user=> (use 'hiccup.core)
nil
user=> (html [:td {:align "center"}])
"<td align=\"center\"></td>"
user=>
I get exactly the same as @mvitz, and there's no code specific to table elements in Hiccup. Are you sure you're using Hiccup and not some other library with Hiccup syntax (like Reagent or similar)?
I'm a numpty - yes, I am using reagent
. Sorry for the noise (and thanks for the excellent hiccup!).
Reagent uses the React DOM, which unlike Hiccup has a bounded set of elements and attributes. The align
attribute on table
elements has been deprecated, so it's likely that React doesn't support it. Instead, CSS should be used.
Hi,
[:td {:align "center"}]
produces<td></td>
. This seems a bug as[:td {:colSpan 2}]
works fine.Is there some magic I need to do (and please don't say 'yeah, don't use tables' ;-)).