Django Mediumeditor

Adds MediumEditor (https://yabwe.github.io/medium-editor/) to Django.
Alternatives To Django Mediumeditor
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Awesome Wagtail1,803
2 months ago1
A curated list of awesome packages, articles, and other cool resources from the Wagtail community.
Django Summernote93422619 months ago73October 14, 202161mitPython
Simply integrate Summernote editor with Django project.
Booktype840
2 years ago6agpl-3.0JavaScript
Booktype is a free, open source platform that produces beautiful, engaging books formatted for print, Amazon, iBooks and almost any ereader within minutes.
Django Markdownx78411659 days ago53January 03, 202248otherPython
Comprehensive Markdown plugin built for Django
Django Markdown Editor72620315 days ago51March 31, 202234gpl-3.0JavaScript
Awesome Django Markdown Editor, supported for Bootstrap & Semantic-UI
Django Wysiwyg46814957 years ago14August 17, 201617mitHTML
A Django application for making Django textareas rich text editors. Certainly as a template tag and possibly as a form widget.
Django Mdeditor407
21a year ago19January 05, 202223gpl-3.0Python
Django-mdeditor is Markdown Editor plugin application for django base on Editor.md.
Django Concurrency388182a year ago23February 25, 20226mitPython
Optimistic lock implementation for Django. Prevents users from doing concurrent editing.
Django Widgy328
2 years ago66otherJavaScript
A CMS framework for Django built on a heterogenous tree editor.
Django Json Widget2819112 years ago8February 17, 202116mitPython
An alternative widget that makes it easy to edit the new Django's field JSONField (PostgreSQL specific model fields)
Alternatives To Django Mediumeditor
Select To Compare


Alternative Project Comparisons
Readme

Django Medium Editor

Adds Medium Editor to Django.

Supported Environments

  • Django 1.10+
  • Python 3.6

Installation

  1. Install django-mediumeditor

    via PyPi:

    pip install django-mediumeditor
    

    via GIT:

    pip install git+https://github.com/g3rd/django-mediumeditor.git
    
  2. Install app

    INSTALLED_APPS = [
        ...
        'mediumeditor',
    ]
    

Usage

Django Admin

Add to Admin class

from mediumeditor.admin import MediumEditorAdmin

@admin.register(MyModel)
class MyModelAdmin(MediumEditorAdmin, admin.ModelAdmin):
    ...
    mediumeditor_fields = ('my_text_field', )
    ...

Forms

  1. Override the Widget for the field

    from mediumeditor.widgets import MediumEditorTextarea
    
    class MyForm(forms.ModelForm):
        ...
        class Meta:
            model = MyModel
            widgets = {
                'my_text_field': MediumEditorTextarea(),
            }
    
  2. In the <head> of the template

    {{ form.media }}
    

Settings

Optionaly change theme or change medium editor options in your settings.py

# Theme options `default`, `roman`, `mani`, `flat`, `bootstrap`, `tim`, `beagle`
MEDIUM_EDITOR_THEME = 'beagle' # `default` is default theme
MEDIUM_EDITOR_OPTIONS = {..}

Available Options

Example:

MEDIUM_EDITOR_THEME = 'bootstrap'
MEDIUM_EDITOR_OPTIONS = {
    'toolbar': {
        'static': True,
        'buttons': [
            'bold',
            'italic',
            'underline',
            'strikethrough',
            'subscript',
            'superscript',
            'h1',
            'h2',
            'h3',
            'h4',
            'h5',
            'h6',
        ]
    },
    'paste': {
        'forcePlainText': True,
        'cleanPastedHTML': False,
        'cleanReplacements': [],
        'cleanAttrs': ['class', 'style', 'dir'],
        'cleanTags': ['meta']
    }
}

Contributing

Take out some bugs

Report issues or feature requests

License

MIT: https://github.com/g3rd/django-mediumeditor/blob/master/LICENSE

Popular Django Projects
Popular Editor Projects
Popular Frameworks Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Python
Django
Editor
Admin
Medium
Medium Editor