From a13497047eb199838ff093dcf1ee392a9573d45a Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 15 Mar 2017 12:12:29 +0100 Subject: [PATCH] Added missing ckeditor config. see #1076 --- .../core/commands/templates/settings.py.tpl | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/modoboa/core/commands/templates/settings.py.tpl b/modoboa/core/commands/templates/settings.py.tpl index 74a6b86fd..4d281cfe0 100644 --- a/modoboa/core/commands/templates/settings.py.tpl +++ b/modoboa/core/commands/templates/settings.py.tpl @@ -48,6 +48,8 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.staticfiles', 'reversion', + 'ckeditor', + 'ckeditor_uploader', 'rest_framework.authtoken', 'rest_framework_swagger', {% if devmode %} 'djangobower',{% endif %} @@ -203,6 +205,38 @@ PASSWORD_COMPLEXITY = { "DIGITS": 1 } +# CKeditor + +CKEDITOR_UPLOAD_PATH = "uploads/" + +CKEDITOR_IMAGE_BACKEND = "pillow" + +CKEDITOR_RESTRICT_BY_USER = True + +CKEDITOR_BROWSE_SHOW_DIRS = True + +CKEDITOR_ALLOW_NONIMAGE_FILES = False + +CKEDITOR_CONFIGS = { + 'default': { + 'allowedContent': True, + 'toolbar': 'Modoboa', + 'width': None, + 'toolbar_Modoboa': [ + ['Bold', 'Italic', 'Underline'], + ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], + ['BidiLtr', 'BidiRtl', 'Language'], + ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'], + ['Undo', 'Redo'], + ['Link', 'Unlink', 'Anchor', '-', 'Smiley'], + ['TextColor', 'BGColor', '-', 'Source'], + ['Font', 'FontSize'], + ['Image', ], + ['SpellChecker'] + ], + }, +} + # Logging configuration LOGGING = {