diff --git a/app/stiftung/views/vorlagen.py b/app/stiftung/views/vorlagen.py index cdcb0ad..0f8feec 100644 --- a/app/stiftung/views/vorlagen.py +++ b/app/stiftung/views/vorlagen.py @@ -57,10 +57,9 @@ def vorlage_editor(request, pk): html_json = json.dumps(vorlage.html_inhalt) html_json = html_json.replace("<", "\\u003c").replace(">", "\\u003e") - # Serienbrief templates are full HTML documents with Django template tags - # ({% for %}, {% if %}) — Summernote WYSIWYG mangles these. - # Use a plain code editor textarea instead. - use_code_editor = vorlage.kategorie == "serienbrief" + # All templates contain Django template tags ({{ }}, {% %}) that + # Summernote WYSIWYG mangles on save. Use plain code editor for all. + use_code_editor = True return render(request, "stiftung/vorlage_editor.html", { "vorlage": vorlage, diff --git a/app/templates/stiftung/vorlage_editor.html b/app/templates/stiftung/vorlage_editor.html index 4fb858d..f13ea58 100644 --- a/app/templates/stiftung/vorlage_editor.html +++ b/app/templates/stiftung/vorlage_editor.html @@ -1,11 +1,7 @@ {% extends 'base.html' %} -{% load static %} - {% block title %}{{ vorlage.bezeichnung }} – Vorlage bearbeiten{% endblock %} {% block extra_css %} - -