Skip to main content

Commonmark support for Wagtail

Project description

wagtail-commonmark: CommonMark fields and blocks for Wagtail

Tired of annoying rich text editors getting in the way of your content input? Wish Wagtail worked more like a wiki? Well, now it can.

wagtail-commonmark provides CommonMark field support for Wagtail. Specifically, it provides:

  • A wagtailcommonmark.blocks.CommonMarkBlock for use in streamfields.
  • A wagtailcommonmark.fields.CommonMarkField for use in page models.
  • A wagtailcommonmark.edit_handlers.CommonMarkPanel for use in the editor interface.
  • A wagtailcommonmark.jinja2tags.commonmark extension for use in jinja2 templates.
  • A commonmark template tag.


Alpha release is available on Pypi - - installable via pip install wagtail-commonmark.

Using it



Use it as a StreamField block:

from wagtailcommonmark.blocks import CommonMarkBlock

class MyStreamBlock(StreamBlock):
    markdown = CommonMarkBlock(icon="code")

Or use as a page field:

from wagtailcommonmark.edit_handlers import CommonMarkPanel
from wagtailcommonmark.fields import CommonMarkField

class MyPage(Page):
    body = CommonMarkField()

    content_panels = [
        FieldPanel("title", classname="full title"),

And render the content in a template:

{% load wagtailcommonmark %}
{{ self.body|commonmark }}

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtail-commonmark-0.2.2.tar.gz (120.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page