How to add a WYMEditor to admin panel? I'm using it for my user-to-user messaging app and I want to replace my textarea to text editor.
Embed WYMEditor in admin
1.6k views Asked by AudioBubble At
2
There are 2 answers
1
On
Rather than re-inventing this wheel, I would recommend using something like django-wymeditor.
To use this, taken the included example, just add an admin.py:
from django.contrib import admin
from wymeditor.admin import RichTextAdmin
from example.models import TestModel
class TestModelAdmin(RichTextAdmin):
pass
admin.site.register(TestModel, TestModelAdmin)
First, download WYMEditor package here http://www.wymeditor.org/download/
Create widgets.py
Update your forms.py for message form, like this:
That's it and remember put the exact location of your package