Skip to main content

django-easymde is a WYSIWYG markdown editor for Django

Project description

A markdown editor (with preview) for Django

Use a simple markdown editor https://github.com/Ionaru/easy-markdown-editor in django forms. This project is inspired by https://github.com/sparksuite/simplemde-markdown-editor and https://github.com/douglasmiranda/django-wysiwyg-redactor/.

Note that SimpleMDE is no longer in development, and has been forked to create EasyMDE, which is in active development as of mid-2024.

Getting started

  • install django-easymde
pip install django-easymde
  • add 'easymde' to INSTALLED_APPS.
INSTALLED_APPS = (
    # ...
    'easymde',
    # ...
)

Using field in models

from django.db import models
from easymde.fields import EasyMDEField

class Entry(models.Model):
    title = models.CharField(max_length=250, verbose_name=u'Title')
    content = EasyMDEField(verbose_name=u'mardown content')

Note: The widget EasyMDEWidget can also be used in forms on existing fields.

EasyMDE options

EasyMDE options can be set in settings.py:

EASYMDE_OPTIONS = {
    'placeholder': 'Type here...',
    'status': False,
    'autosave': {
        'enabled': True
    }
}

For the autosave option, this plugin will generate uniqueId with python's uuid.uuid4 automatically.

Right now, this plugin supports EasyMDE Configurations, but only the static ones(no support for javascript configurations such as previewRender)

Get EasyMDE instance from DOM

After EasyMDE is initialized, a EasyMDE instance can be retrieved from the DOM element:

$('.easymde-box')[0].EasyMDE

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_easymde-1.0.4.tar.gz (113.9 kB view details)

Uploaded Source

Built Distribution

django_easymde-1.0.4-py3-none-any.whl (114.8 kB view details)

Uploaded Python 3

File details

Details for the file django_easymde-1.0.4.tar.gz.

File metadata

  • Download URL: django_easymde-1.0.4.tar.gz
  • Upload date:
  • Size: 113.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for django_easymde-1.0.4.tar.gz
Algorithm Hash digest
SHA256 0690902bde591461138e174e47f58363f1f7b7fb637ebae7401e7a6449177e26
MD5 abe9ae59ac5c5e4cebc189802c1901d1
BLAKE2b-256 d454abbd9ce6107405a87c57e6a2f664241da6d7fcf4e8e326b4c15d896a0e01

See more details on using hashes here.

File details

Details for the file django_easymde-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for django_easymde-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5b2fd94953b76cb69aebd5d6169056084188e079609bee1300174ad54cfa346a
MD5 39095f9a761da99c3ced4b1c108d409a
BLAKE2b-256 267b0981dbbc659c2cd3281a24e0daf1181dae832e73c5039933ac46e9fbfe43

See more details on using hashes here.

Supported by

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