@@ -1116,6 +1116,76 @@ client.replace_json_document(document_id, content)
11161116- Optional language specification
11171117- Automatic formatting
11181118
1119+ ### Embed Block - External Content
1120+
1121+ Embed external content from various platforms:
1122+
1123+ ``` python
1124+ from vaiz import embed_block, heading, paragraph, horizontal_rule
1125+
1126+ content = [
1127+ heading(1 , " Project Resources" ),
1128+
1129+ # YouTube video
1130+ heading(2 , " Demo Video" ),
1131+ paragraph(" Watch our product demo:" ),
1132+ embed_block(
1133+ url = " https://www.youtube.com/watch?v=dQw4w9WgXcQ" ,
1134+ size = " large"
1135+ ),
1136+
1137+ horizontal_rule(),
1138+
1139+ # Figma design
1140+ heading(2 , " Design Mockups" ),
1141+ paragraph(" View the design files:" ),
1142+ embed_block(
1143+ url = " https://www.figma.com/file/example" ,
1144+ size = " large" ,
1145+ is_content_hidden = True
1146+ ),
1147+
1148+ horizontal_rule(),
1149+
1150+ # CodeSandbox
1151+ heading(2 , " Live Code Example" ),
1152+ paragraph(" Try the code live:" ),
1153+ embed_block(url = " https://codesandbox.io/s/example" ),
1154+
1155+ horizontal_rule(),
1156+
1157+ # Generic iframe (default)
1158+ heading(2 , " External Tool" ),
1159+ embed_block(url = " https://example.com/embed" )
1160+ ]
1161+
1162+ client.replace_json_document(document_id, content)
1163+ ```
1164+
1165+ ** Supported Embed Types:**
1166+ - YouTube - YouTube videos
1167+ - Figma - Figma design files
1168+ - Vimeo - Vimeo videos
1169+ - CodeSandbox - Interactive code sandboxes
1170+ - GitHub Gist - GitHub code snippets
1171+ - Miro - Miro whiteboards
1172+ - Iframe - Generic iframe embeds (default)
1173+
1174+ See [ EmbedType enum] ( ../api-reference/enums#embedtype ) for type-safe values.
1175+
1176+ ** Parameters:**
1177+ - ` url ` - URL of content to embed
1178+ - ` embed_type ` - Type of embed (optional, see [ EmbedType] ( ../api-reference/enums#embedtype ) )
1179+ - ` size ` - Display size: ` "small" ` , ` "medium" ` , ` "large" ` (default: ` "medium" ` )
1180+ - ` is_content_hidden ` - Hide content by default for Figma/Miro (default: ` False ` )
1181+
1182+ ** Use Cases:**
1183+ - Video tutorials and demos
1184+ - Design system documentation
1185+ - Live code examples
1186+ - Interactive prototypes
1187+ - External tool integrations
1188+
11191189### Complete Navigation Example
11201190
11211191Combine all navigation blocks for optimal user experience:
@@ -1190,6 +1260,7 @@ All helper functions create nodes compatible with the document editor:
11901260- ✅ ` image_block() ` - Embed images
11911261- ✅ ` files_block() ` - Attach files
11921262- ✅ ` code_block() ` - Code with syntax highlighting
1263+ - ✅ ` embed_block() ` - Embed external content (YouTube, Figma, etc.)
11931264
11941265### Navigation Blocks
11951266- ✅ ` toc_block() ` - Automatic table of contents
0 commit comments