Skip to content
Document Authoring DA  API Docs v1.15.1
npmGitHub

Table

Table:

type: "table"


replaceText: ReplaceTextSignature

rows(): TableRow[]

TableRow[]


addRow(index?): TableRow

number

TableRow


removeRow(index): TableRow | undefined

number

TableRow | undefined


findSection(): Section | undefined

Returns the Section containing this table, or undefined if this table is not a body-level block (e.g. it is nested inside a header, footer, or table cell, or has been removed from the body).

Section | undefined

const block = body.content().blocklevels()[3];
if (block.type === 'table') {
const section = block.findSection();
section?.pageSetup().setPageMargins({ top: 36, bottom: 36, left: 72, right: 72 });
}