Skip to main content

A Django application that provides a TinyMCE 4 editor widget without any static files

Project description

django-tinymce4-widget

CI Status Documentation Status Test coverage pre-commit.ci status

Poetry black pre-commit

PyPi Status pyversions license


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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_tinymce4_widget-7.0.2.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

django_tinymce4_widget-7.0.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file django_tinymce4_widget-7.0.2.tar.gz.

File metadata

File hashes

Hashes for django_tinymce4_widget-7.0.2.tar.gz
Algorithm Hash digest
SHA256 902653e453f1a53dec347e2f8497b0401be7247600c2cce9d965e26233f09e31
MD5 9e6dd9886fb1bbc6032cea80c677968a
BLAKE2b-256 1195f530238f460905ab6e5062a322a2d174fd3415f39eb71d29b8a7e2c8b1ee

See more details on using hashes here.

File details

Details for the file django_tinymce4_widget-7.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_tinymce4_widget-7.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9ef0e88994d15aba70e370ce7acf76ba9007763b0e931c195dea2896c25a91ff
MD5 78354e2c357766cff1382be342095d13
BLAKE2b-256 d82b1f856c393a6021d7a47622892695093862a63b87e81dbaf4476cd2df85c8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page