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
Built Distribution
File details
Details for the file django_easymde-1.0.3.tar.gz
.
File metadata
- Download URL: django_easymde-1.0.3.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e872a7fbf17e249b984fec0d592749f91dd647bd7e8e353dbccb1ede6744348a |
|
MD5 | c0cf7affefc15a18fa4f12b96f94005e |
|
BLAKE2b-256 | 04a7a967f12eb6044c22330065b61d8b11d2e765ece976abf70be6f14f2711bd |
File details
Details for the file django_easymde-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: django_easymde-1.0.3-py3-none-any.whl
- Upload date:
- Size: 114.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba90c0dfabb63ec2631886e354670f7266fd295df7b9b6ee265b32dca0a673c7 |
|
MD5 | a9363e4949b90d56f7dce4250e8a940e |
|
BLAKE2b-256 | 97eb1ad3701d086d5897a2c1f592d13e63ae38e0184ef854bac546b7695492fd |