Skip to main content

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.

Installation

Alpha release is available on Pypi - https://pypi.org/project/wagtail-commonmark/ - installable via pip install wagtail-commonmark.

Using it

Add it to INSTALLED_APPS:

INSTALLED_APPS += [
    'wagtailcommonmark',
]

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"),
        CommonMarkPanel("body"),
    ]

And render the content in a template:

{% load wagtailcommonmark %}
<article>
{{ self.body|commonmark }}
</article>

Metadata

Release files for wagtail-commonmark 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-commonmark 0.2.2
File Size Uploaded Provenance Actions
wagtail-commonmark-0.2.2.tar.gz 120.6 kB Without provenance Details for wagtail-commonmark-0.2.2.tar.gz

Release files / wagtail-commonmark-0.2.2.tar.gz

Download URL wagtail-commonmark-0.2.2.tar.gz
Size 120.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c87a9997beee0499a64c8f1142c3838adba8d464d571a05dc6d4cb60aa095514
BLAKE2b-256 checksum
How to use checksums
087fc99bdd45792f210cf624825beac3f91ce2bb5aa4b037c0c932eebb62519f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Security for wagtail-commonmark 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page