A Django application that provides a TinyMCE 4 editor widget without any static files
Project description
django-tinymce4-widget
Documentation: https://django-tinymce4-widget.readthedocs.io
Source Code: https://github.com/browniebroke/django-tinymce4-widget
django-tinymce4-widget is a reworked fork of django-tinymce4-lite. It provides a minimal TinyMCE 4 editor widget that can be used in Django forms.
This version does not include any static files, it's using the TinyMCE from the CDN by default.
Warning: TinyMCE 4 is incompatible with TinyMCE 3. Read TinyMCE docs for more information about how to configure TimyMCE 4 editor widget.
Compatibility
- Python: 3.8-3.11
- Django: 3.2-4.2
Quick Start
Install django-tinymce4-widget
:
$ pip install django-tinymce4-widget
Add tinymce
to INSTALLED_APPS
in settings.py
for your Django project:
INSTALLED_APPS = (
...
'tinymce',
)
Add tinymce.urls
to urls.py
for your project:
urlpatterns = [
...
url(r'^tinymce/', include('tinymce.urls')),
...
]
In your code:
from django.db import models
from tinymce import HTMLField
class MyModel(models.Model):
...
content = HTMLField('Content')
In Django Admin the widget is used automatically for all models that have HTMLField
fields. If you are using TinyMCE 4 in your website forms, add form.media
variable into your templates:
<!DOCTYPE html>
<html>
<head>
...
{{ form.media }}
</head>
<body>
...
</body>
</html>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_tinymce4_widget-7.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 902653e453f1a53dec347e2f8497b0401be7247600c2cce9d965e26233f09e31 |
|
MD5 | 9e6dd9886fb1bbc6032cea80c677968a |
|
BLAKE2b-256 | 1195f530238f460905ab6e5062a322a2d174fd3415f39eb71d29b8a7e2c8b1ee |
Hashes for django_tinymce4_widget-7.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ef0e88994d15aba70e370ce7acf76ba9007763b0e931c195dea2896c25a91ff |
|
MD5 | 78354e2c357766cff1382be342095d13 |
|
BLAKE2b-256 | d82b1f856c393a6021d7a47622892695093862a63b87e81dbaf4476cd2df85c8 |