Copy of github.com/divio/djangocms-text-ckeditor for packaging
This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Patrick Lauber af48bdcd55 1.0.4 release 2012-12-14 15:10:23 +01:00
.tx initial commit 2012-11-26 16:09:56 +01:00
djangocms_text_ckeditor 1.0.4 release 2012-12-14 15:10:23 +01:00
.Python initial commit 2012-11-26 16:09:56 +01:00
.gitignore gitignore 2012-11-28 11:05:39 +01:00
LICENSE.txt initial commit 2012-11-26 16:09:56 +01:00
MANIFEST.in 1.0.4 release 2012-12-14 15:10:23 +01:00
README.rst 1.0.4 release 2012-12-14 15:10:23 +01:00
legal.txt initial commit 2012-11-26 16:09:56 +01:00
requirements.txt setup py 2012-12-10 16:58:44 +01:00
schemamigration.py locales, forms, plugins changed 2012-11-28 13:24:39 +01:00
setup.py added instructions for updating from cms.plugins.text 2012-12-11 15:11:07 +01:00

README.rst

djangocms-text-ckeditor
=======================

Text Plugin for django-cms with CK-Editor

.. WARNING::
   ``cms.plugins.text`` and ``djangocms-text-ckeditor`` can't be used at the same time.


Installation
------------

This plugin requires `django CMS` 2.3 or higher to be properly installed.

* In your projects `virtualenv`_, run ``pip install djangocms-text-ckeditor``.
* Add ``'djangocms_text_ckeditor'`` to your ``INSTALLED_APPS`` setting **BEFORE** the ``cms`` entry.
* Run ``manage.py migrate djangocms_text_ckeditor``.


Upgrading from ``cms.plugins.text``
-----------------------------------

* Remove ``cms.plugins.text`` from ``INSTALLED_APPS``
* Add ``djangocms_text_ckeditor`` to ``INSTALLED_APPS``
* Run ``python manage.py migrate djangocms_text_ckeditor 0001 --fake``


Usage
-----

You can add a new setting to your settings.py called `CKEDITOR_SETTINGS`

the default is::

	CKEDITOR_SETTINGS = {
	    'language': '{{ language }}',
	    'toolbar': 'CMS',
	    'skin': 'moono'
	}

It is a dict that hold all CKEditor settings. For an  overview of all the available settings have a look here:

http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html for all settings

Drag & Drop Images
------------------

In IE and Firefox based browsers it is possible to drag and drop a picture into the text editor.
This image is base64 encoded and lives in the 'src' attribute as a 'data' tag.

We detect this images, encode them and convert them to picture plugins.
If you want to overwirite this behavior for your own picture plugin:

There is a setting called:

`TEXT_SAVE_IMAGE_FUNCTION = 'djangocms_text_ckeditor.picture_save.create_picture_plugin'` 

you can overwrite this setting in your settings.py and point it to a function that handles image saves.
Have a look at the function `create_picture_plugin` for details.


Translations
------------

If you want to help translate the plugin please do it on transifex:

https://www.transifex.com/projects/p/django-cms/resource/djangocms-text-ckeditor/