Wagtail News Image
This Django app provides an inline image block for the Draftail WYSIWYG editor.
You can play with this plugin on a demo site here.
This image block supports:
This is what the image block looks like in the Draftail WYSIWYG editor:
Clicking on the block reveals a modal, which allows you to edit the image:
settings.py you need to register the app in
# settings.py INSTALLED_APPS = [ # ... 'wagtailnewsimage', # ... ]
urls.py you need to add
wagtailnewsimage.urls. The base url (
wagtailnewsimage/) can be configured to be whatever you like.
# urls.py urlpatterns = [ # ... path(r'wagtailnewsimage/', include('wagtailnewsimage.urls')), # ... ]
models.py you need to add
news-image to your RichTextField features whitelist
# models.py class MyPage(Page): body = RichTextField(features=[ # ... 'news-image', # ... ])
- Wagtail (2+)
- Django (1.11+)
- Django Rest Framework (3+)