Skip to main content
# Django Medium Editor
Adds [Medium Editor](https://yabwe.github.io/medium-editor/) to [Django](https://www.djangoproject.com/).

## 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 defualt theme
MEDIUM_EDITOR_OPTIONS = {..}
```
[Available Options](https://github.com/yabwe/medium-editor/blob/master/OPTIONS.md)

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](https://github.com/g3rd/django-mediumeditor/issues)

[Report issues or feature requests](https://github.com/g3rd/django-mediumeditor/issues)


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


Metadata

Release files for django-mediumeditor 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-mediumeditor 1.0.0
File Size Uploaded Provenance
django-mediumeditor-1.0.0.tar.gz 5.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-mediumeditor 1.0.0
File Interpreter ABI Platform
django_mediumeditor-1.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 12.9 kB

Release files / django-mediumeditor-1.0.0.tar.gz

Download URL django-mediumeditor-1.0.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e71c27bf4797ab48c4948a50ff75d8e5c96e09150588cadafa587aca30e1ec87
BLAKE2b-256 checksum
How to use checksums
cae4bc6150e9e63b7a4155913bfa592e3a0ef331561d9e790058ab21a4cbbac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_mediumeditor-1.0.0-py2.py3-none-any.whl

Download URL django_mediumeditor-1.0.0-py2.py3-none-any.whl
Size 7.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
775d53988c05dc9a625137fed832fb43125071874fa85470b886d3b06effb810
BLAKE2b-256 checksum
How to use checksums
1849dc172f72d87286cd3c3ad548c0dfacd08242b86e8cf776b9ca1e66cb764e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-mediumeditor 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page