diff --git a/example/assets/sample_data.json b/example/assets/sample_data.json index a0b44f50..685b833a 100644 --- a/example/assets/sample_data.json +++ b/example/assets/sample_data.json @@ -17,6 +17,11 @@ "style":"display: block; margin: auto;" } }, + { + "insert": { + "video": "https://www.youtube.com/watch?v=V4hgdKhIqtc&list=PLbhaS_83B97s78HsDTtplRTEhcFsqSqIK&index=1" + } + }, { "insert":"\nRich text editor for Flutter" }, diff --git a/lib/src/models/documents/nodes/embed.dart b/lib/src/models/documents/nodes/embed.dart index 07e6a6b3..18c550fe 100644 --- a/lib/src/models/documents/nodes/embed.dart +++ b/lib/src/models/documents/nodes/embed.dart @@ -39,4 +39,7 @@ class BlockEmbed extends Embeddable { static const String imageType = 'image'; static BlockEmbed image(String imageUrl) => BlockEmbed(imageType, imageUrl); + + static const String videoType = 'video'; + static BlockEmbed video(String videoUrl) => BlockEmbed(videoType, videoUrl); }