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

    Function createBlock

    • Creates a bookmark block.

      Parameters

      • options: string | Object

        A string representing the URL, or an options object.

        • string
        • Object
          • url

            The URL to be bookmarked.

          • caption

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

      Returns Object

      A bookmark block object compatible with Notion's API.

      // Use with just a URL
      const simpleBookmark = block.bookmark.createBlock("https://www.flylighter.com");

      // Use with options object
      const complexBookmark = block.bookmark.createBlock({
      url: "https://www.flylighter.com",
      caption: "Flylighter is a super-rad web clipper for Notion."
      });

      // Use with options object and array of strings for caption
      const multiLineBookmark = block.bookmark.createBlock({
      url: "https://www.flylighter.com",
      caption: ["Flylighter is a web clipper for Notion...", "...and Obsidian, too."]
      });