ITCase-django / django-tinymce-4

Integrate TinyMCE 4 in Django projects.
MIT License
11 stars 4 forks source link
django tinymce

django-tinymce-4

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

Integrate TinyMCE4 in Django projects with Django Filebrowser_

Features

Install

.. code-block:: bash

pip install django-tinymce-4

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

.. code-block:: python

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

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

.. code-block:: python

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

Usage

.. code-block:: python

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

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

Custom Settings

Demo

.. code-block:: bash

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

Contributing

. Create an issue to discuss about your idea

. Fork it

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

. Commit your changes: git commit -am 'Add some feature'

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

. Create a new Pull Request

. Profit!

Setup environment

Install npm packages

.. code-block:: bash

cd django-tinymce-4/ npm install

Run example

.. code-block:: bash

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

Build css

.. code-block:: bash

gulp css

Branches

.. _Django Filebrowser: https://github.com/sehmaschine/django-filebrowser/ .. _Django: http://djangoproject.com/ .. TinyMCE4: http://tinymce.com/ .. Base Settings: https://www.tinymce.com/docs/demo/full-featured/ .. _External plugins: https://www.tinymce.com/docs/configure/integration-and-setup/#external_plugins .. _Templates: https://www.tinymce.com/docs/plugins/template/