Martor - Django Markdown Editor

PyPI Version License Python Version Django Version Build Status

Martor is a comprehensive Markdown Editor plugin for Django, designed to provide a powerful and user-friendly markdown editing experience with support for both Bootstrap and Semantic-UI frameworks.

Features

  • πŸ“ Live Preview - Real-time markdown rendering

  • ⚑ Ace Editor Integration - Powerful code editor with syntax highlighting

  • 🎨 Dual Theme Support - Bootstrap and Semantic-UI compatible

  • πŸ“€ Image Upload - Direct upload to imgur.com or custom endpoints

  • πŸ‘₯ User Mentions - Direct mention users with @[username] syntax

  • 🎬 Video Embedding - Embed videos from YouTube, Vimeo, and more

  • βœ… Spellcheck - Built-in spell checking (US English)

  • πŸ˜€ Emoji Support - Full emoji support with cheat sheets

  • πŸ”§ Django Admin Integration - Seamless admin interface integration

  • πŸ›‘οΈ Security Features - XSS protection and HTML sanitization

  • πŸ”— Custom ID Support - Add custom IDs to text elements

  • 🧩 Extensible - Custom markdown extensions support

Quick Start

Installation:

pip install martor

Add to your Django settings:

INSTALLED_APPS = [
    ...
    'martor',
]

Include Martor URLs:

urlpatterns = [
    ...
    path('martor/', include('martor.urls')),
]

Collect static files:

python manage.py collectstatic

Usage in your models:

from martor.models import MartorField

class Post(models.Model):
    content = MartorField()

That’s it! You now have a powerful markdown editor in your Django application.

Documentation Contents

Screenshots

Martor Editor Interface:

Martor Editor

Live Preview:

Martor Preview

Community & Support

License

Martor is released under the GNU General Public License v3.0.

Indices and Tables