Skip to main content

Rich text editor for Django based on Tiptap.

Project description

DJ Tiptap

Opinionated TipTap editor implementation for Django sites.

Docs are still a work in progress. See the example app for usage.

Settings

All settings are optional; the package works with sensible defaults. Upload and browse buttons only appear in the toolbar when the corresponding URL is configured.

Setting Default Purpose
DJ_TIPTAP_UPLOAD_URL unset (uploads disabled) URL name or path of the attachment upload endpoint
DJ_TIPTAP_BROWSE_URL unset (library disabled) URL name or path of the media-library browse endpoint
DJ_TIPTAP_MAX_UPLOAD_SIZE_MB 10 Maximum image upload size
DJ_TIPTAP_MAX_VIDEO_UPLOAD_SIZE_MB 100 Maximum video upload size
DJ_TIPTAP_ALLOWED_IMAGE_TYPES JPEG/PNG/GIF/WebP Dict of Pillow format → mime type accepted by the upload view
DJ_TIPTAP_ALLOWED_VIDEO_TYPES {"video/mp4", "video/webm"} Set of video mime types accepted by the upload view; set to set() to disable video uploads

Images are inserted as <img> and validated with Pillow; videos are inserted as HTML5 <video controls> elements and validated by magic bytes with puremagic. The upload endpoint lives in the host project (see example/website/views.py for the reference implementation) — its JSON response's content_type field tells the editor which element to insert.

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

dj_tiptap-0.1.7.tar.gz (268.1 kB view details)

Uploaded Source

Built Distribution

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

dj_tiptap-0.1.7-py3-none-any.whl (260.1 kB view details)

Uploaded Python 3

File details

Details for the file dj_tiptap-0.1.7.tar.gz.

File metadata

  • Download URL: dj_tiptap-0.1.7.tar.gz
  • Upload date:
  • Size: 268.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.28.0 CPython/3.14.6 Linux/6.17.0-1018-azure

File hashes

Hashes for dj_tiptap-0.1.7.tar.gz
Algorithm Hash digest
SHA256 68425225520e10aef307e3f2293478a2d6fcd2ecb981824f03546b17edf87cbf
MD5 9763b9db50c8d49b7e3bfa40f121bf03
BLAKE2b-256 8bd0c21aa57542933af8aaca5a959aa0ce66717d5152c82fc623c2a22da67972

See more details on using hashes here.

File details

Details for the file dj_tiptap-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: dj_tiptap-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 260.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.28.0 CPython/3.14.6 Linux/6.17.0-1018-azure

File hashes

Hashes for dj_tiptap-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b9882e82193362faa6fc975bd2f4aa170e7337675f0b56aed5796954aaf15cc0
MD5 403a6cedee5fa494b9df479fd2a893a1
BLAKE2b-256 c7006223987b2605307f3542b1c0f79c1c6d1624de70fb61847e776540da6e92

See more details on using hashes here.

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