Skip to main content

Drop-in TipTap (ProseMirror) rich-text editor widget for Django forms and admin.

Project description

django-tiptap-editor

CI PyPI Python versions Django versions Docs Coverage Ruff License

A reusable, pip-installable Django package providing a drop-in rich-text editor backed by TipTap (headless ProseMirror): a form Widget, an admin widget, a ModelAdmin mixin, a settings default, and vendored static assets — node-free for consumers.

What this is

A reusable rich-text editor for Django: a form Widget, an admin widget, a ModelAdmin mixin, a settings-driven config, and committed static assets — with a clean, options-object surface and its own config schema.

  • Stored value is HTML (render it with |safe), never JSON.
  • ProseMirror's schema is a sanitizer: scripts and unknown nodes are dropped on parse, and link/image protocols are allowlisted — so |safe is justified.
  • Node-free for consumers: the editor ships as a committed, self-contained bundle. An optional glue-only ESM build lets you bring your own TipTap via CDN / import maps.
  • Extensible without a build step: a runtime registry for custom extensions, toolbar buttons, and layered (CSS-variable) theming.
  • Full toolbar (formatting, font size/family, colour, highlight, lists, alignment, links, images, tables, source view), image upload + library picker, merge tags, and en/sv i18n out of the box.

Installation

pip install django-tiptap-editor

Add the app to INSTALLED_APPS (it ships the static bundle):

INSTALLED_APPS = [
    # ...
    "django_tiptap_editor",
]

Quickstart

from django import forms
from django_tiptap_editor.forms.fields import TipTapFormField

class ArticleForm(forms.Form):
    body = TipTapFormField()

In the admin:

from django.contrib import admin
from django_tiptap_editor.admin.mixin import TipTapModelAdminMixin

@admin.register(Article)
class ArticleAdmin(TipTapModelAdminMixin, admin.ModelAdmin):
    pass  # every TextField becomes a TipTap editor

Render the field with {{ form.media }} (or {% tiptap_media %}) in your template, and display the stored HTML with {{ article.body|safe }}. See the documentation for configuration, the upload/image-list contracts, theming, extension authoring, asset modes, and the migration guide.

Documentation

Full documentation is published at artui.github.io/django-tiptap-editor.

License

MIT — see LICENSE.

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

django_tiptap_editor-0.3.1.tar.gz (320.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_tiptap_editor-0.3.1-py3-none-any.whl (164.2 kB view details)

Uploaded Python 3

File details

Details for the file django_tiptap_editor-0.3.1.tar.gz.

File metadata

  • Download URL: django_tiptap_editor-0.3.1.tar.gz
  • Upload date:
  • Size: 320.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_tiptap_editor-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c40dbad40d963f1b36a2a2158c252230637cd235f0fab3f5b070f24a17c98300
MD5 97fecaa2a798c8addaedc0ef309a45b1
BLAKE2b-256 248c75bb0f1d5bd2b7b500792d0e09c39bab35be8abfdf85f846368a9e18b752

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_tiptap_editor-0.3.1.tar.gz:

Publisher: release.yml on Artui/django-tiptap-editor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_tiptap_editor-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_tiptap_editor-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9029a6801e3a591a80e2f4dfbc09a1691cdd41e0c2047b9eadab8c4304e52e77
MD5 467e2b4ce505435ad29c44f6e0b35027
BLAKE2b-256 78764dbfd92f337bc9c7abb895812026578223d5cf3d4618892b2cca35111d55

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_tiptap_editor-0.3.1-py3-none-any.whl:

Publisher: release.yml on Artui/django-tiptap-editor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page