Skip to main content

A Django application that provides a fully functional TinyMCE 4 editor widget for models and forms.

Project description

django-tinymce4-lite

https://travis-ci.org/romanvm/django-tinymce4-lite.svg?branch=master https://codecov.io/github/romanvm/django-tinymce4-lite/coverage.svg?branch=master https://www.quantifiedcode.com/api/v1/project/48b63a65324642af823606c3c0444395/badge.svg https://badge.fury.io/py/django-tinymce4-lite.svg

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+

  • Django: 1.8-1.11

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

http://romanvm.github.io/django-tinymce4-lite

License

MIT license. See LICENSE.txt

Changelog

1.3.2

  • Fix compatibility with Django v.1.11

1.3.1

  • Upgraded TinyMCE to v.4.5.5

  • Fix language file configuration for languages with country codes [Gagaro].

  • Test rendering TinyMCE 4 with Selenium/PhantomJS.

1.3.0

  • Upgraded TinyMCE to v.4.5.1

1.2.0

  • Upgraded TinyMCE to v.4.4.3

  • Added TINYMCE_ADDITIONAL_JS_URLS configuration option.

1.1.0

  • Upgraded TinyMCE to v.4.4.1

  • Added Django 1.10 to compatibility matrix

1.0.0

  • Initial PyPI release

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-lite-1.3.2.tar.gz (727.0 kB view hashes)

Uploaded Source

Built Distribution

django_tinymce4_lite-1.3.2-py2.py3-none-any.whl (960.6 kB view hashes)

Uploaded Python 2 Python 3

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