Skip to main content

Django Markdown Editor Next

An advanced Markdown editor for Django admin with real-time preview, image uploads, and customizable toolbar. This package extends and improves upon existing Django Markdown editors.

Installation

pip install django-markdown-editor-next

Setup

  1. Add 'django_markdown_editor_next' to your INSTALLED_APPS setting.

  2. Add the following to your project's urls.py:

    from django.urls import path, include
    
    urlpatterns = [
        # ... your other url patterns
        path('markdown-editor-next/', include('django_markdown_editor_next.urls')),
    ]
    
  3. Ensure your MEDIA_ROOT and MEDIA_URL settings are configured in your Django settings:

    MEDIA_ROOT = BASE_DIR / 'media'
    MEDIA_URL = '/media/'
    
  4. In your models, use the MarkdownField:

    from django_markdown_editor_next.fields import MarkdownField
    
    class MyModel(models.Model):
        content = MarkdownField()
    

Features

  • Real-time Markdown preview
  • Image uploads with drag-and-drop support
  • Customizable toolbar
  • Keyboard shortcuts
  • Syntax highlighting for code blocks
  • Emoji picker

Customizing the Toolbar

You can customize the toolbar buttons when defining your model field:

content = MarkdownField(
    custom_toolbar=[
        {'action': 'bold', 'icon': 'fas fa-bold', 'title': 'Bold'},
        {'action': 'italic', 'icon': 'fas fa-italic', 'title': 'Italic'},
        {'action': 'link', 'icon': 'fas fa-link', 'title': 'Link'},
        {'action': 'image', 'icon': 'fas fa-image', 'title': 'Image'},
        {'action': 'preview', 'icon': 'fas fa-eye', 'title': 'Toggle Preview'},
        {'action': 'emoji', 'icon': 'fas fa-smile', 'title': 'Insert Emoji'}
    ]
)

Keyboard Shortcuts

  • Ctrl/Cmd + B: Bold
  • Ctrl/Cmd + I: Italic
  • Ctrl/Cmd + K: Insert Link
  • Ctrl/Cmd + Shift + C: Insert Code Block

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Release files for django-markdown-editor-next 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-markdown-editor-next 0.5
File Size Uploaded
django_markdown_editor_next-0.5.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-markdown-editor-next 0.5
File Interpreter ABI Platform
django_markdown_editor_next-0.5-py3-none-any.whl Python 3 none any Details

Total release size: 15.9 kB

Release files / django_markdown_editor_next-0.5.tar.gz

Download URL django_markdown_editor_next-0.5.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f2af96db47bf8e649c466abbc7140e65a94e4fe5457b9fdfe3838d13a9ce4bb2
BLAKE2b-256 checksum
How to use checksums
854020b43915d424145310ca8e3ce95594fa155abfd9a97d59566815081c8811
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / django_markdown_editor_next-0.5-py3-none-any.whl

Download URL django_markdown_editor_next-0.5-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
130c43bd82d7de3e00f5161566e308ab141b4a097bba2bb3ab9cfe04b75eb26a
BLAKE2b-256 checksum
How to use checksums
f9a9705738591718cd3d458cedad4e9a5f677038555cbdc14d110d920282cebd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.5 This release

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page