EditorJS as a widget for Wagtail, with Page- and Image chooser support
Project description
wagtail_editorjs
A Wagtail EditorJS widget with page/image chooser support, document support and more!
Quick start
-
Add 'wagtail_editorjs' to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ..., 'wagtail_editorjs', ]
-
Add the HTML to your template:
<link rel="stylesheet" href="{% static 'wagtail_editorjs/css/frontend.css' %}"> {% load editorjs %} {% editorjs self.editor_field %}
-
Add the field to your model:
... from wagtail_editorjs.fields import EditorJSField class HomePage(Page): content_panels = [ FieldPanel("editor_field"), ] editor_field = EditorJSField( # All supported features features=[ 'attaches', 'checklist', 'code', 'delimiter', 'header', 'image', 'inline-code', 'marker', 'nested-list', 'paragraph', 'quote', 'raw', 'table', 'underline', 'warning', 'link', 'text-alignment-tune', 'text-variant-tune' ], blank=True, null=True, )
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wagtail_editorjs-1.0.7.tar.gz
(151.4 kB
view details)
File details
Details for the file wagtail_editorjs-1.0.7.tar.gz
.
File metadata
- Download URL: wagtail_editorjs-1.0.7.tar.gz
- Upload date:
- Size: 151.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0de88c934f4f3e6efd343074fd4a541b1f9e497d7aaa7fc05a977131e71c87c |
|
MD5 | 4d46f3c2baec32e7e048b5db8881e35c |
|
BLAKE2b-256 | 53aef9d0a672b27738bd71137b3ad7918d0cd56fd195321c1e54e65ec8ad0c77 |