A table (Lexical type "table").
The children are Kotoba.Nodes.TableRow nodes, and a table is valid only
under the root. The editor's layout keys (colWidths, rowStriping,
frozenColumnCount, frozenRowCount) stay in extra: to_json/1
writes them back, and the renderers do not use them.
In HTML, the table is in a div.kotoba-table-scroll (a wide table
scrolls in it, as in the editor), a first row of header cells goes in a
thead, and the other rows in a tbody. In Markdown, the table is a GitHub Flavored Markdown
table: the first row is its header row when it is made of header cells,
and the header row is empty otherwise. Markdown has no merged cells and
no blocks in a cell, so the Markdown of such a table is lossy: see
Kotoba.Nodes.TableCell.
Summary
Functions
Splits the rows of a table into the header row and the body rows. The
first row is a header row when it has cells and all of them are header
cells of a row (headerState 1 or 3).
Types
Functions
@spec split_header(t()) :: {[Kotoba.Node.t()], [Kotoba.Node.t()]}
Splits the rows of a table into the header row and the body rows. The
first row is a header row when it has cells and all of them are header
cells of a row (headerState 1 or 3).