nypublicradio / wagtail-react-streamfield

Powerful field for inserting multiple blocks with nesting

Home Page:https://wagtail.github.io/react-streamfield/public/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wagtail React StreamField

Drop-in replacement for the StreamField in Wagtail.

This work was funded thanks to a Kickstarter campaign!

It relies on react-streamfield, a React package created for the occasion.

This work is currently in beta phase and will in the end be merged in Wagtail. You should be careful and manually check that it works for your own StreamField and report any bug you find.

Requirements

Wagtail 2.6 or above.

Getting started

It’s really easy to setup, like most NoriPyt packages:

  • pip install wagtail-react-streamfield
  • Add 'wagtail_react_streamfield', to your INSTALLED_APPS before 'wagtail.admin', 'wagtail.images', 'wagtail.docs' & 'wagtail.snippets'

That’s it!

Usage

wagtail-react-streamfield has the same class API as the regular StreamField. What changes:

Meta attributes (or passed to __init__)

closed
Set to True to close all blocks of this type when loading the page. Defaults to False.

Screenshots

https://raw.github.com/noripyt/wagtail-react-streamfield/master/wagtail-react-streamfield-screenshot-1.png

https://raw.github.com/noripyt/wagtail-react-streamfield/master/wagtail-react-streamfield-screenshot-2.png

https://raw.github.com/noripyt/wagtail-react-streamfield/master/wagtail-react-streamfield-screenshot-3.png

About

Powerful field for inserting multiple blocks with nesting

https://wagtail.github.io/react-streamfield/public/

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 56.4%Language:JavaScript 37.4%Language:SCSS 5.3%Language:HTML 0.9%