Skip to content

Commit

Permalink
make rich text FE ready
Browse files Browse the repository at this point in the history
  • Loading branch information
mwvolo committed Jul 12, 2024
1 parent 8345894 commit 6ab2a08
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pages/custom_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

from api.serializers import ImageSerializer
from openstax.functions import build_image_url, build_document_url

from wagtail.templatetags import wagtailcore_tags

class APIRichTextBlock(blocks.RichTextBlock):
def get_api_representation(self, value, context=None):
return value.source
return wagtailcore_tags.richtext(value.source)

class Meta:
icon = 'doc-full'
Expand Down Expand Up @@ -58,7 +58,6 @@ class Meta:
label = "Button"
value_class = LinkStructValue


class ImageFormatChoiceBlock(FieldBlock):
field = forms.ChoiceField(required=False, choices=(
('left', 'Wrap left'), ('right', 'Wrap right'), ('mid', 'Mid width'), ('full', 'Full width'),))
Expand Down

0 comments on commit 6ab2a08

Please sign in to comment.