A string representing the URL to be embedded, a UUID that represents a file upload, or an options object.
The URL to be embedded.
An embed block object compatible with Notion's API.
// Use with a URL string
const simpleEmbed = block.embed.createBlock("https://www.youtube.com/watch?v=ec5m6t77eYM");
// Use with a UUID string (file upload)
const simpleFileUploadEmbed = block.embed.createBlock("24142df2c64080g28b18edb72f486550")
// Use with options object with URL
const complexEmbed = block.embed.createBlock({
url: "https://www.youtube.com/watch?v=ec5m6t77eYM"
});
// Use with options object with file upload
const complexFileUploadEmbed = block.embed.createBlock({
type: "file_upload",
file_upload: {
id: "24142df2c64080g28b18edb72f486550"
}
})
Creates an embed block.