Skip to main content

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

  1. Add 'wagtail_editorjs' to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
    ...,
    'wagtail_editorjs',
    ]
    
  2. Add the HTML to your template:

    <link rel="stylesheet" href="{% static 'wagtail_editorjs/css/frontend.css' %}">
    {% load editorjs %}
    {% editorjs self.editor_field %}
    
  3. 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


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.9.tar.gz (151.4 kB view details)

Uploaded Source

File details

Details for the file wagtail_editorjs-1.0.9.tar.gz.

File metadata

  • Download URL: wagtail_editorjs-1.0.9.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

Hashes for wagtail_editorjs-1.0.9.tar.gz
Algorithm Hash digest
SHA256 1cac16d1f4ef2dcdd3ba2f18d736d9bdeae7e8cdb1b4287fb8f8e0bd036441a8
MD5 aea18c8ce1a4a97a5831563e1129cb5f
BLAKE2b-256 377c3030afe1b7d403b7f1cd0dfdafbe7d4aa5045769171d5e90a0fdbf0c3336

See more details on using hashes here.

Provenance

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