I'm working backend with a wagtail headless CMS and the frontend is JavaScript. I'm using a RichTextField and on the API it shows the image like this: "<embed alt="a" embedtype="image" format="fullwidth" id="3"/>" so because its embedtype it can't be shown on our page. I need to change the type to img with a src. I haven't tried anything because i don't even know how to start. This is the model with the RichTextField
class ValueTagMotivation(Orderable, ClusterableModel):
"""Teams motivate why a tag was picked"""
team = ParentalKey(
TeamPage, on_delete=models.CASCADE, related_name="value_tag_motivations"
)
value_tag = models.ForeignKey(ValueTag, on_delete=models.CASCADE, related_name="+")
tagline = models.CharField(max_length=255)
motivation = RichTextField(
features=["bold", "italic", "ol", "ul", "link", "image", "embed"]
)
panels = [FieldPanel("value_tag"), FieldPanel("tagline"), FieldPanel("motivation")]
class Meta:
# a team can only pick each tag once
unique_together = (("team", "value_tag"),)