Django widget for Toast UI Editor (markdown mode)
Project description
django-toastui-markdown-editor
A Django widget that integrates Toast UI Editor into Django forms and admin as a drop-in replacement for standard textarea fields with rich markdown editing.
Features
- TuiEditorWidget - Form widget that replaces textareas with Toast UI Editor
- AdminTuiEditorWidget - Specialized widget with admin-specific styling (full width, larger height)
- TuiEditorField - Model field (
TextField) that automatically uses the Toast UI Editor in forms - Configurable - Editor settings (edit type, preview style, height, toolbar) via
configparameter - Formset support - Works with Django admin inlines and dynamically added forms
- content-editor plugin - Integrates with django-content-editor activation/deactivation events
Requirements
- Python 3.10+
- Django 4.2+
Installation
pip install django-toastui-markdown-editor
Add to your INSTALLED_APPS:
INSTALLED_APPS = [
...
'tui_editor',
]
Quick Start
In a Model
from django.db import models
from tui_editor.fields import TuiEditorField
class Article(models.Model):
body = TuiEditorField()
In a Form
from django import forms
from tui_editor.widgets import TuiEditorWidget
class ArticleForm(forms.Form):
body = forms.CharField(widget=TuiEditorWidget())
In Django Admin
from django.contrib import admin
from tui_editor.widgets import AdminTuiEditorWidget
class ArticleAdmin(admin.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': AdminTuiEditorWidget()},
}
Configuration
Pass a config dict to the widget to customize the editor:
TuiEditorWidget(config={
'initialEditType': 'wysiwyg', # or 'markdown' (default)
'previewStyle': 'vertical', # or 'tab' (default)
'height': '500px', # default: '300px'
})
Disclaimer
This project is not affiliated with, endorsed by, or associated with NHN or the Toast UI project. It is an independent, third-party Django integration that bundles the Toast UI Editor library.
License
MIT License - see LICENSE for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_toastui_markdown_editor-0.1.0.tar.gz.
File metadata
- Download URL: django_toastui_markdown_editor-0.1.0.tar.gz
- Upload date:
- Size: 290.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd4e4732b7c516be387e88cbef078c5499072d5dd00d871ebec87829100f3a20
|
|
| MD5 |
0d0169835c14b4a445c17791cf664934
|
|
| BLAKE2b-256 |
b208318884fb7655600224648408351a7bca2af73b2be1b00d2e62b48af48367
|
Provenance
The following attestation bundles were made for django_toastui_markdown_editor-0.1.0.tar.gz:
Publisher:
publish.yml on arthanson/django-toastui-markdown-editor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_toastui_markdown_editor-0.1.0.tar.gz -
Subject digest:
fd4e4732b7c516be387e88cbef078c5499072d5dd00d871ebec87829100f3a20 - Sigstore transparency entry: 1235564089
- Sigstore integration time:
-
Permalink:
arthanson/django-toastui-markdown-editor@54d8b3e5cde199c98b2a2d073c77ece4db9541e9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/arthanson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54d8b3e5cde199c98b2a2d073c77ece4db9541e9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_toastui_markdown_editor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_toastui_markdown_editor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 292.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce716b8c4ac710679d3869a776ddd7847d8ab03bd3d53e2185ad1725f8cc2c44
|
|
| MD5 |
8b93252347148a35654bc01830904204
|
|
| BLAKE2b-256 |
05811b3762da2d07d8f5d6b2fe66c4a657f09924c218b59641fef70ba9f6a2d2
|
Provenance
The following attestation bundles were made for django_toastui_markdown_editor-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on arthanson/django-toastui-markdown-editor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_toastui_markdown_editor-0.1.0-py3-none-any.whl -
Subject digest:
ce716b8c4ac710679d3869a776ddd7847d8ab03bd3d53e2185ad1725f8cc2c44 - Sigstore transparency entry: 1235564155
- Sigstore integration time:
-
Permalink:
arthanson/django-toastui-markdown-editor@54d8b3e5cde199c98b2a2d073c77ece4db9541e9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/arthanson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54d8b3e5cde199c98b2a2d073c77ece4db9541e9 -
Trigger Event:
release
-
Statement type: