DjangoCMS Plugin that lets you insert raw HTML code into a page.
A raw HTML plugin may be a bit of a CMS anti-pattern, but every now and then there are times when inserting a little block of HTML code is needed to get a job done quickly.
This Plugin combines the ideas of cmsplugin-raw-html with code-editor-django-admin by giving you a nice HTML editor CodeMirror to edit the code in rather than a default TextField
.
Install via pip:
pip install djangocms-rawhtml
Add to your
INSTALLED_APPS
(insettings.py
):INSTALLED_APPS = ( ... 'djangocms_rawhtml', ... )
Run migrations:
python manage.py migrate djangocms_rawhtml
- "Raw HTML" should now be available as a plugin in the CMS!
In your settings.py you can set:
CODEMIRROR_THEME
: (Optional) The name of the codemirror theme you would like to use (just the name, don't include the.css
part). Will usedefault
if not set. See: https://codemirror.net/theme/ for a list of themes.