API Reference

django-tinymce4-lite

This application provides a rich-text WYSIWYG TinyMCE 4 widget for Django forms and models.

class tinymce.HTMLField(*args, **kwargs)[source]

Bases: django.db.models.fields.TextField

A text area model field for HTML content.

It uses the TinyMCE 4 widget in forms.

Example:

from django.db.models import Model
from tinymce import HTMLField

class Foo(Model):
    html_content = HTMLField('HTML content')
class tinymce.TinyMCE(attrs=None, mce_attrs=None, profile=None)[source]

Bases: django.forms.widgets.Textarea

TinyMCE 4 widget

It replaces a textarea form widget with a rich-text WYSIWYG TinyMCE 4 editor widget.

Parameters:
  • attrs (dict) – General Django widget attributes.
  • mce_attrs (dict) – Additional configuration parameters for TinyMCE 4. They amend the existing configuration.
  • profile (dict) – TinyMCE 4 configuration parameters. They replace the existing configuration.
class tinymce.AdminTinyMCE(attrs=None, mce_attrs=None, profile=None)[source]

Bases: tinymce.widgets.TinyMCE, django.contrib.admin.widgets.AdminTextareaWidget

TinyMCE 4 widget for Django Admin interface