Notion Helper - v1.3.29
    Preparing search index...

    Function createBlock

    • Creates a table row block.

      Parameters

      • cells: (string | Object[])[] = []

        An array of cell contents. Each cell can be a string or an array of rich text objects.

      Returns Object

      A table row block object compatible with Notion's API.

      // Use with an array of strings
      const simpleRow = block.table_row.createBlock(["Cell 1", "Cell 2", "Cell 3"]);

      // Use with an array of rich text objects
      const complexRow = block.table_row.createBlock([
      [{ type: "text", text: { rich_text: "Cell 1" } }],
      [{ type: "text", text: { rich_text: "Cell 2", annotations: { bold: true } } }],
      [{ type: "text", text: { rich_text: "Cell 3" } }]
      ]);