


CMSPlugin Redactor

This is a Django-CMS plugin providing Django-RedactorMedia and thus Django-Redactor to the CMS. Django-Redactor itself is a Django app providing the Redactor Javascript WYSIWYG-editor in Django. Please note: While this software is licensed under MIT the Redactor Javascript editor and Django-Redactor are not. See the Django-Redactor license.


For now you have to install from the Bitbucket repository. One requirement is Django-Redactor. Install as they suggest. Currently there is no PyPi package for it.

Installing manual from Bitbucket

To install from the source do:

$ hg clone
$ cd django-redactormedia

Install the module:

$ python install


$ pip install .

Or copy the redactormedia sub dir to your Python path or Django project root dir:

$ cp django-redactormedia/redactormedia $PYTHONPATH

Now, add the redactormedia application to your INSTALLED_APPS setting.


The redactormedia app provides a Django widget called RedactorWithMediaEditor. It is a drop-in replacement for any TextArea widget. Example usage:

from django import forms
from django.db import models

from redactormedia.widgets import RedactorWithMediaEditor

class MyForm(forms.Form):
    about_me = forms.TextField(widget=RedactorWithMediaEditor())

You can also customize any of the Redactor editor's settings when instantiating the widget:

class MyForm(forms.Form):

    about_me = forms.TextField(widget=RedactorWithMediaEditor(redactor_settings={
        'autoformat': True,
        'overlay': False,
        'imageUpload': reverse('upload_files'),
        'imageGetJson': reverse('recent_files'),

Django-redactormedia also includes a widget with some some customizations that make it function and look better in the Django admin:

class MyAdmin(admin.ModelAdmin):
    formfield_overrides = {
            models.TextField: {'widget': AdminRedactorWithMediaEditor},

Finally, you can connect a custom CSS file to the editable area of the editor:

class MyForm(forms.Form):
    about_me = forms.CharField(widget=RedactorWithMediaEditor(

Paths used to specify CSS can be either relative or absolute. If a path starts with '/', 'http://' or 'https://', it will be interpreted as an absolute path, and left as-is. All other paths will be prepended with the value of the STATIC_URL setting (or MEDIA_URL if static is not defined).


If you are using a redactor widget outside the admin, you'll need to be sure that you render the form's media. Redactor widgets need to include some CSS and JavaScript to work properly:

    {{ }}
    {{ myform.as_p }}
    <input type="submit"/>


This code is heavily based on this Blog article by Patrick Altman and its comments. Thanks guys.


Django-Redactormedia is licensed under the MIT License. Please note the dependency Django-Redactor license.

Recent activity

Tip: Use camelCasing e.g. ProjME to search for