Wiki
Clone wikiadf-builder-java / node-table
Node: table
Description
A container for the nodes that define a table.
Example
Java
table() .tr(th(" Row one, cell one")) .tr(td("Row one, cell two"));
ADF
{ "type": "table", "attrs": { "localId": "table-id" }, "content": [ { "type": "tableRow", "content": [ { "type": "tableHeader", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": " Row one, cell one" } ] } ] } ] }, { "type": "tableRow", "content": [ { "type": "tableCell", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "Row one, cell two" } ] } ] } ] } ] }
Result
Row one, cell one |
---|
Row one, cell two |
Compatibility
Products
Confluence | Jira |
---|---|
✅ | ⚠️1 |
Usage
Marks
Structure
- type -
table
- attrs?
- content - array(tableRow...) (at least 1)
Recommended width
values
Column Count | Minimum Width | Maximum Width |
---|---|---|
1 | 48 | 1800 |
2 | 96 | 1800 |
3+ | 144 | 1800 |
-
width
sets the width (in pixels) of the table on the page. This value is independent of the table's column width, which allows control of the table's overflow. This supersedes the existinglayout
attribute and will be used instead of it at runtime. Ifwidth
is not provided the editor will convertlayout
to pixels (default=760
,wide=960
andfull-width=1800
). Although no minimum and maximum width is enforced, it is recommended to follow these guidelines in the table above. None of these settings apply to Jira, where all tables are automatically displayed across the full width of the text container. ↩↩↩ -
Although the
layout
setting is mostly superseded by thewidth
setting, thelayout
is still significant when it is set tocenter
oralign-start
. Thecenter
option aligns the table to the center of the page, andalign-start
option aligns the table to the left. In both of these cases, thewidth
cannot exceed the width of the page. Otherlayout
values will be converted towidth
settings as described above. ↩ -
The
displayMode
controls how tables adapt to narrow screens. By default, columns will shrink up to 40% of their nominal size to accommodate a narrow screen. When thedisplayMode
is set tofixed
, the columns will preserve their original width regardless of screen size, forcing the user interface to handle this in some other way, such as by providing a scrollbar. ↩
Updated