Initial video support

pull/298/head
Xin Yao 4 years ago
parent cdd88241a6
commit bce32edc35
  1. 5
      example/assets/sample_data.json
  2. 3
      lib/src/models/documents/nodes/embed.dart

@ -17,6 +17,11 @@
"style":"display: block; margin: auto;" "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" "insert":"\nRich text editor for Flutter"
}, },

@ -39,4 +39,7 @@ class BlockEmbed extends Embeddable {
static const String imageType = 'image'; static const String imageType = 'image';
static BlockEmbed image(String imageUrl) => BlockEmbed(imageType, imageUrl); static BlockEmbed image(String imageUrl) => BlockEmbed(imageType, imageUrl);
static const String videoType = 'video';
static BlockEmbed video(String videoUrl) => BlockEmbed(videoType, videoUrl);
} }

Loading…
Cancel
Save