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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 456f809cc93eff81ce12bc926f07bbfa092a6b51bb3cf7603423003df98e512a |
|
MD5 | bba2f2c1ad03792e220550f35360e398 |
|
BLAKE2b-256 | 3421c195a9cfe6feb4d099b5c12c29438c89d3a859ea9533305943eaa76a9503 |
Hashes for django_tinymce4_lite-1.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b5ce272da8d8360a94fd5029db8ad0ed65fee268539fc2a254997a201b9181c |
|
MD5 | a64c7fa070986cf5fc2e67e57993e3e2 |
|
BLAKE2b-256 | 4e7cbd0c2d95ef97b8534e8079d482fdfe37470040d6c0f64740b1e08358d1e2 |