A Django application that contains a widget to render a form field with a WYMEditor interface.
Download or fork into your python path.
Add
wymeditor
to yourINSTALLED_APPS
.In your model, use a
WYMEditorField
instead of amodels.TextField
:from wymeditor.models import WYMEditorField
- class SomeModel(models.Model):
an_html_field = WYMEditorField()
In your
admin.py
, useWYMAdmin
as the base class instead ofadmin.ModelAdmin
(or use multiple inheritance and addWYMAdmin
as a mixin)from wymeditor.admin import WYMAdmin
- class SomeModelAdmin(WYMAdmin):
pass
admin.site.register(SomeModel, SomeModelAdmin)