Back to Wagtail

Legacy richtext

docs/reference/contrib/legacy_richtext.md

7.3.1491 B
Original Source

Legacy richtext

{module}

Provides the legacy richtext wrapper. This causes rich text to be wrapped in a div, with the class rich-text applied.

Place wagtail.contrib.legacy.richtext before wagtail in INSTALLED_APPS.

python
INSTALLED_APPS = [
    ...
    "wagtail.contrib.legacy.richtext",
    "wagtail",
    ...
]

The {{ page.body|richtext }} template filter will now render:

html+django
<div class="rich-text">...</div>