diff --git a/docs/topics/streamfield.md b/docs/topics/streamfield.md index 8ace5e98c3..79e5d0f786 100644 --- a/docs/topics/streamfield.md +++ b/docs/topics/streamfield.md @@ -588,7 +588,8 @@ my_page.body[0] = ('heading', "My story") del my_page.body[-1] # Append a rich text block to the stream -my_page.body.append(('paragraph', "
And they all lived happily ever after.
")) +from wagtail.rich_text import RichText +my_page.body.append(('paragraph', RichText("And they all lived happily ever after.
"))) # Save the updated data back to the database my_page.save()