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

    Function createBlock

    • Creates an embed block.

      Parameters

      • options: string | Object

        A string representing the URL to be embedded, or an options object.

        • string
        • Object
          • url

            The URL to be embedded.

      Returns Object

      An embed block object compatible with Notion's API.

      // Use with a string
      const simpleEmbed = block.embed.createBlock("https://www.youtube.com/watch?v=ec5m6t77eYM");

      // Use with options object
      const complexEmbed = block.embed.createBlock({
      url: "https://www.youtube.com/watch?v=ec5m6t77eYM"
      });