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 = SimpleMDEField(verbose_name=u'mardown content')

Note: The widget SimpleMDEWidget 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 SimpleMDE instance from DOM

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

$('.simplemde-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.2.tar.gz (113.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_easymde-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 b35eabc6c06f74a5f6c7517845721b29f08e4697f0fbe9f3b3889fd72323c1a6
MD5 09884004e6b591a423cfb585d3512677
BLAKE2b-256 eb03506ac931ffccfe3500560f605fcc40bb29aaf733cb714a7756b783f0f24c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_easymde-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 289a39e3c09dedf6661e48cbeddb28d370a1b436b77cb94ac12fc1b9e8ec7b51
MD5 8264b27636934212df1bc38d51eb6c4e
BLAKE2b-256 f618ce18e9dcb38a0dc15bbafb2aa6b12fcb7646346eb20e7a4813740a5cc5eb

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