Creates a table of contents block.
Optional
A string representing the color, or an options object.
Color for the table of contents.
A table of contents block object compatible with Notion's API.
// Use with default settingsconst simpleTOC = block.table_of_contents.createBlock();// Use with a color stringconst coloredTOC = block.table_of_contents.createBlock("red");// Use with options objectconst complexTOC = block.table_of_contents.createBlock({ color: "blue" }); Copy
// Use with default settingsconst simpleTOC = block.table_of_contents.createBlock();// Use with a color stringconst coloredTOC = block.table_of_contents.createBlock("red");// Use with options objectconst complexTOC = block.table_of_contents.createBlock({ color: "blue" });
Creates a table of contents block.