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

    Function createBlock

    • Creates a paragraph block.

      Parameters

      • options: string | Object | string[]

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

        • string
        • Object
          • rich_text

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

          • children

            An array of child block objects.

          • color

            Color for the text.

        • string[]

      Returns Object

      A paragraph block object compatible with Notion's API.

      // Direct use with a string
      const paragraphBlock = block.paragraph.createBlock("Hello, World!");

      // Direct use with an array of strings
      const multiLineParagraph = block.paragraph.createBlock(["I'm a line", "I'm also a line!"]);

      // Usage with options object
      const complexParagraph = block.paragraph.createBlock({
      rich_text: "Complex paragraph",
      color: "red",
      children: [
      // Child blocks would go here
      ]
      });