Hello im new to wagtail . Originally , i saw that we were able to conveniently embed videos via draftail , however i was unable to give it any styling. Therefore i swapped methods and so far i have been using the following implementation to embed videos into my project.
blocks.py
class VideoBlock(blocks.StreamBlock):
'''rich text'''
title = blocks.CharBlock(required=True, help_text="Add your Title")
texts = blocks.TextBlock(required=True, help_text="Add your additional text")
embed = EmbedBlock()
class Meta:
template = "streams/video_block.html"
icon = "edit"
label = "Full Rich Text
video_block.html
{% load wagtailembeds_tags %}
{%for content in self %}
<div class="container" style="text-align: center;">
{{content}}
{% embed page.video_url %}
</div>
{%endfor%}
That being said , I still do not know how to properly resize it. I would preferably want my website to look like this : here
i found a really good link over her : here
Heres my code if anybody is interested:
video_block.html
templatetags/video_tag.py