Notion Helper - v1.3.29
    Preparing search index...
    • Creates a table of contents block.

      Parameters

      • Optionaloptions: string | Object = "default"

        A string representing the color, or an options object.

        • string
        • Object
          • color

            Color for the table of contents.

      Returns Object

      A table of contents block object compatible with Notion's API.

      // Use with default settings
      const simpleTOC = block.table_of_contents.createBlock();

      // Use with a color string
      const coloredTOC = block.table_of_contents.createBlock("red");

      // Use with options object
      const complexTOC = block.table_of_contents.createBlock({ color: "blue" });