Skip to content

sinaso/django-mediumeditor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Medium Editor

Adds Medium Editor to Django.

Supported Environments

  • Django 1.9
  • Python 3.4

Installation

  1. Install django-mediumeditor

    via PyPi:

    pip install django-mediumeditor
    

    via GIT:

pip install git+https://github.com/g3rd/django-mediumeditor.git ```

  1. 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

NOTE: This is untested

  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 }}
    

Contributing

Take out some bugs

Report issues or feature requests

License

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

About

Adds MediumEditor (https://yabwe.github.io/medium-editor/) to Django.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 52.0%
  • JavaScript 40.9%
  • CSS 7.1%