Add more content for the body of a blogpost
This commit is contained in:
parent
5c80ebe18d
commit
24123c99cf
4 changed files with 33 additions and 3 deletions
|
@ -1,8 +1,15 @@
|
|||
from wagtail.blocks import RichTextBlock
|
||||
from wagtail.embeds.blocks import EmbedBlock
|
||||
|
||||
from base.blocks import StreamBlock
|
||||
from base.blocks import StreamBlock, HeadingBlock, ImageBlock
|
||||
from wagtailcodeblock.blocks import CodeBlock
|
||||
|
||||
class BlogPostBlock(StreamBlock):
|
||||
heading_block = HeadingBlock()
|
||||
paragraph = RichTextBlock(blank=True)
|
||||
code = CodeBlock(label='Code snippet')
|
||||
image_block = ImageBlock()
|
||||
embed_block = EmbedBlock(
|
||||
help_text="Insert a URL to embed. For example, https://www.youtube.com/watch?v=SGJFWirQ3ks",
|
||||
icon="media",
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue