from wagtail.core.templatetags.wagtailcore_tags import richtext
class RichtextBlock(blocks.RichTextBlock):
"""Richtext without (limited) all the features"""
def get_api_representation(self, value, context=None):
return richtext(value.source)
class Meta: # noqa
template = "streams/richtext_block.html"
icon = "doc-full"
label = "Full RichText"
'Back-End > Wagtail, Django' 카테고리의 다른 글
Wagtail Recaptcha (0) | 2021.11.28 |
---|---|
Wagtail Rich Editor Extend (0) | 2021.11.27 |
Wagtail API v2 Serializing a QuerySet (0) | 2021.11.25 |
Wagtail API v2 Custom Page Properties (0) | 2021.11.25 |
Wagtail API v2 Image Rendition Field (0) | 2021.11.24 |