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
Built Distribution
File details
Details for the file django_easymde-1.0.1.tar.gz
.
File metadata
- Download URL: django_easymde-1.0.1.tar.gz
- Upload date:
- Size: 114.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d2977c2ac6e364366c981e2b1b4f9ab998a7f84f636dcc44ab054aa1d00c593 |
|
MD5 | 4d63241d598f5b0432ec77a9d394945e |
|
BLAKE2b-256 | aeb49af5c1d87f77bf095b6af253d8cdb0d03983d2f11296d0c64188f83bb8bf |
File details
Details for the file django_easymde-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: django_easymde-1.0.1-py3-none-any.whl
- Upload date:
- Size: 115.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed82aee5ab0a467a547f0054c5bd5c4b406ecd092e275d9bf08171de49f9e547 |
|
MD5 | 09fc821ddf1a3e2f5b06ecd9c546e4f1 |
|
BLAKE2b-256 | cb46631e16d488680b51781846b794ed8dcb70e2b043178f7725ecc7dbdf5281 |