Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now integration as django model/form field

Project description


This module integrates the Editor.js widget into model/form fields for Django.


This is an early prototyp and work in progress


Install with Pip:
pip install django-editorjs-field

Django Setup


Use in Django admin

from django.db import models
from editorjs_field.fields import EditorJSField

class Article(models.Model):
    title = models.CharField(max_length=100)
    content = EditorJSField()

from django.contrib import admin
from .models import Article

class ArticleAdmin(admin.ModelAdmin):
    list_display = ('title',), ArticleAdmin)

Use the widget in a custom form

from django import forms
from editorjs_field.widgets import EditorJsWidget

class ArticleEditorForm(forms.Form):
    title = forms.CharField(label='Title')
    document = forms.CharField(label='Document', widget=EditorJsWidget)

Examples & Development

An example can be found in the example folder. To run them clone the repository and run:

$ cd django-editorjs-field
$ pipenv install
$ pipenv shell
$ cd example
$ python migrate
$ python createsuperuser
$ python runserver

Visit http://localhost:8000/admin to view the admin widget and http://localhost:8000/ to view the custom form widget.

Project details

Release history Release notifications

This version
History Node


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
django-editorjs-field-0.0.3.tar.gz (90.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page