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

    Function createBlock

    • Creates a to-do list block.

      Parameters

      • options: string | Object | string[]

        A string, an array of strings, or an options object representing the to-do content.

        • string
        • Object
          • rich_text

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

          • checked

            Whether the to-do item is checked.

          • children

            An array of child block objects.

          • color

            Color for the to-do text.

        • string[]

      Returns Object

      A to-do list block object compatible with Notion's API.

      // Use with a string
      const simpleToDo = block.to_do.createBlock("Simple task");

      // Use with options object
      const complexToDo = block.to_do.createBlock({
      rich_text: "Complex task",
      checked: true,
      color: "green",
      children: [
      // Child blocks would go here
      ]
      });