A Django application that provides a fully functional TinyMCE 4 editor widget for models and forms.
Project description
django-tinymce4-lite
django-tinymce4-lite is a reworked fork of django-tinymce4. It provides a fully functional TinyMCE 4 editor widget that can be used in Django forms and models. The application can use django-filebrowser or django-filebrowser-no-grappelli as a file manager for TinyMCE 4 to insert images and file links into edited text.
Warning: TinyMCE 4 is incompatible with TinyMCE 3. Read TinyMCE docs for more information about how to configure TimyMCE 4 editor widget.
Compatibility
Python: 2.7, 3.4, 3.5
Django: 1.8, 1.9
Quick Start
Install django-tinymce4-lite:
$ pip install django-tinymce4-lite
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>
Documentation
License
MIT license. See LICENSE.txt
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-lite-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3966d7a02c12b52aee3fb34d411c68b976247979a6363bde2665d7ff36d21fe2 |
|
MD5 | a47e0959c099f8aa99e533c5e97dbff4 |
|
BLAKE2b-256 | 3e2abe993fb65f79784ee3420ef39e72965bd1bff858a7dd69c82fcfc88c008f |
Hashes for django_tinymce4_lite-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 365db7d07b810393d19752c58f4cd7bcd15858899b3fbd2d65aeba5a16f36609 |
|
MD5 | 70cb9c9a5738807e7a0f448a75f44ad3 |
|
BLAKE2b-256 | 8ba5ff5c34a6eaaace488037ce5f765d9dbb93265ed9387ba8b075ad2520d18a |