From 194161ec595614a7b5497319ef229866e6db7434 Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Thu, 11 Jan 2018 14:34:09 +0200 Subject: [PATCH] Only load Hallo CSS if Hallo is in use --- wagtail/admin/rich_text/editors/hallo.py | 4 +++- wagtail/admin/templates/wagtailadmin/pages/_editor_css.html | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wagtail/admin/rich_text/editors/hallo.py b/wagtail/admin/rich_text/editors/hallo.py index 2ffb6fd1a..47fdd24b7 100644 --- a/wagtail/admin/rich_text/editors/hallo.py +++ b/wagtail/admin/rich_text/editors/hallo.py @@ -133,7 +133,9 @@ class HalloRichTextArea(WidgetWithScript, widgets.Textarea): media = Media(js=[ 'wagtailadmin/js/vendor/hallo.js', 'wagtailadmin/js/hallo-bootstrap.js', - ]) + ], css={ + 'all': ['wagtailadmin/css/panels/rich-text.css'] + }) for plugin in self.plugins: media += plugin.media diff --git a/wagtail/admin/templates/wagtailadmin/pages/_editor_css.html b/wagtail/admin/templates/wagtailadmin/pages/_editor_css.html index 2de738b9a..46f680c4c 100644 --- a/wagtail/admin/templates/wagtailadmin/pages/_editor_css.html +++ b/wagtail/admin/templates/wagtailadmin/pages/_editor_css.html @@ -4,8 +4,7 @@ CSS declarations to be included on the 'create page' and 'edit page' views {% endcomment %} - - + {% hook_output 'insert_editor_css' %}