Skip to main content

Integrate TinyMCE 4 in Django projects

Project description

django-tinymce-4

https://travis-ci.com/ITCase-django/django-tinymce-4.svg?branch=master

Integrate TinyMCE4 in Django projects with Django Filebrowser

Features

Install

pip install django-tinymce-4

Add applications to INSTALLED_APPS in settings.py for your project (order is important):

INSTALLED_APPS = (
    'tinymce_4',
    'grappelli',
    'filebrowser',
    'django.contrib.admin',
)

Add the Django Filebrowser site to your url-patterns (before any admin-urls):

url(r'^grappelli/', include('grappelli.urls')),
url(r'^admin/', include([
    url(r'^', include(admin.site.urls)),
    url(r'^filebrowser/', include(fb_site.urls)),
])),

Usage

from tinymce_4.fields import TinyMCEModelField
from django.db import models

class ModelFoo(models.Model):
    content = TinyMCEModelField('Foo content')

Custom Settings

  • Base Settings: /tinymce_4/static/tinymce_4/settings/full/setings.js

  • Menu: /tinymce_4/static/tinymce_4/settings/full/menu.js

  • Plugins: /tinymce_4/static/tinymce_4/settings/full/plugins.js

  • External plugins: /tinymce_4/static/tinymce_4/settings/full/external_plugins.js

  • Templates: /tinymce_4/static/tinymce_4/settings/full/templates.js

Demo

cd django-tinymce-4/example/
pip install -r requirements.txt
python manage.py runserver

Contributing

  1. Create an issue to discuss about your idea

  2. Fork it

  3. Create your feature branch: git checkout -b new-feature

  4. Commit your changes: git commit -am ‘Add some feature’

  5. Push to the branch: git push origin new-feature

  6. Create a new Pull Request

  7. Profit!

Setup environment

Install npm packages

cd django-tinymce-4/
npm install

Run example

cd django-tinymce-4/example
python manage.py runserver

Build css

gulp css

Branches

  • master - latest release branch

  • develop - development branch for new releases

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-tinymce-4-0.0.26.tar.gz (1.4 MB view details)

Uploaded Source

File details

Details for the file django-tinymce-4-0.0.26.tar.gz.

File metadata

  • Download URL: django-tinymce-4-0.0.26.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for django-tinymce-4-0.0.26.tar.gz
Algorithm Hash digest
SHA256 2f2a24878e53288c3b44be846c335b6b4be144d0b36ca481a2fc9b9d193f30a1
MD5 5466c7c00c3d058d40393a3028f785b6
BLAKE2b-256 d89d40a70ac85dc43c25e9e9476e39335cf8371f5dd14b7cbaaea9e0dea51d10

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