Love this package. I have a lot of tables that I need to display on the fly and would like this tool built out some more. In particular, styling. I'm thinking tableify() could take a styleOptions object that looks something like this:
const styleOptions = {
tableStyle: "font-family: Helvetica, Arial, sans-serif; font-size: 11px; line-height: 20px;",
trStyle: null,
tdStyle: "padding: 4px 2px; text-align: left; vertical-align: top; background-color: #eaeaea;"
}
These then get inserted into the tag with e.g. style="'" + styleOptions.tableStyle + "'"
Alternatively, one could specify the table ID to target it with CSS by passing the id to tableify(). So you could write tableify("myTableID")
...and then you could have CSS that targets, like
#myTableId table {
font-weight: bold;
font-size: 10px;
font-weight: bold;
}
#myTableId td {
vertical-align: top;
text-align: left;
float: left;
}
Love this package. I have a lot of tables that I need to display on the fly and would like this tool built out some more. In particular, styling. I'm thinking
tableify()could take astyleOptionsobject that looks something like this:These then get inserted into the tag with e.g.
style="'" + styleOptions.tableStyle + "'"Alternatively, one could specify the table ID to target it with CSS by passing the id to
tableify(). So you could writetableify("myTableID")...and then you could have CSS that targets, like