table()
ts
function table(...rows): Node;Defined in: table.ts:255
Builder-element for a table
Parameters
| Parameter | Type | Description |
|---|---|---|
...rows | (TableRowNode | null | undefined)[] | Rows of this table |
Returns
A markdown node
Example
ts
import { define, table, tableRow, tableCell } from "@ogs-gmbh/markdown";
const markdown = define(
table(
tableRow(
tableCell("Name", "left"),
tableCell("Price", "left"),
),
tableRow(
tableCell("Smartphone", "left"),
tableCell("1.300,00 €", "left"),
)
)
);
console.assert(
markdown.toString()
);See
Since
1.0.0
Author
Simon Kovtyk