.. 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
_
TinyMCE4
_.Django Filebrowser
_... 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)),
])),
.. code-block:: python
from tinymce_4.fields import TinyMCEModelField from django.db import models
class ModelFoo(models.Model): content = TinyMCEModelField('Foo content')
Base Settings
_: /tinymce_4/static/tinymce_4/settings/full/setings.jsExternal plugins
_: /tinymce_4/static/tinymce_4/settings/full/external_plugins.jsTemplates
_: /tinymce_4/static/tinymce_4/settings/full/templates.js.. code-block:: bash
cd django-tinymce-4/example/ pip install -r requirements.txt python manage.py runserver
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
.. _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/