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

    Function createBlock

    • Creates a heading_1 block.

      Adding children will coerce headings to toggle headings.

      Parameters

      • options: string | Object | string[]

        A string, an array of strings, or an options object representing the heading content.

        • string
        • Object
          • rich_text

            The content as a string, an array of strings, or an array of rich text objects.

          • color

            Color for the heading text.

          • is_toggleable

            Whether the heading is toggleable.

          • children

            An array of child block objects.

        • string[]

      Returns Object

      A heading_1 block object compatible with Notion's API.

      // Use with a string
      const simpleHeading = block.heading_1.createBlock("Simple Heading");

      // Use with options object
      const complexHeading = block.heading_1.createBlock({
      rich_text: "Complex Heading",
      color: "red",
      is_toggleable: true,
      children: [
      // Child blocks would go here
      ]
      });