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

    Function createBlock

    • Creates a column list block. Column list blocks must have at least two column child blocks, each of which must have at least one child block - otherwise, the Notion API will throw an error.

      Parameters

      • Optionaloptions: number | any[]

        The options for creating the column list block.

      Returns Object | null

      The created column list block object, or null if invalid input is provided.

      // Create a column list with 3 empty columns
      const emptyColumns = block.column_list.createBlock(3);
      // Create a column list with 2 columns, each containing a paragraph
      const twoColumnList = block.column_list.createBlock(["First column", "Second column"]);
      // Create a column list with mixed content
      const mixedColumnList = block.column_list.createBlock([
      "Text in first column",
      ["Paragraph 1 in second column", "Paragraph 2 in second column"],
      {
      type: "column",
      column: {},
      children: [block.heading_2.createBlock("Custom heading in third column")]
      }
      ]);
      // Create an empty column list
      const emptyColumnList = block.column_list.createBlock();