Enhance newsletter functionality and UI improvements

- Introduce `create_outlook_html` function for generating Outlook-compatible newsletter HTML.
- Update dashboard to include `outlook_html` in the response.
- Modify newsletter generation logic to support separate handling of Outlook HTML.
- Improve CSS styles for newsletter preview and layout adjustments.
- Add new button for downloading HTML directly from the dashboard.
This commit is contained in:
smueller
2026-07-03 13:07:33 +02:00
parent e5e4d812c7
commit 90cdb7e922
5 changed files with 626 additions and 96 deletions

View File

@@ -98,14 +98,16 @@
<section class="card">
<h3>Newsletter-Vorschau (mit Hyperlinks)</h3>
<p class="hint">Für Outlook den Button „Für Outlook kopieren“ nutzen dann bleiben Links als klickbare Hyperlinks erhalten.</p>
<p class="hint">Für Outlook „Für Outlook kopieren“ nutzen und mit <strong>Strg+V</strong> einfügen (Rechtsklick → „Format beibehalten“). Falls Kopieren nicht klappt (z. B. per HTTP/IP), „HTML herunterladen“ verwenden und die Datei in Outlook öffnen.</p>
<div class="copy-actions">
<button type="button" id="copy-outlook-btn" class="btn-secondary">Für Outlook kopieren</button>
<button type="button" id="copy-html-source-btn" class="btn-secondary">HTML-Quelltext kopieren</button>
<button type="button" id="download-html-btn" class="btn-secondary">HTML herunterladen</button>
<span id="copy-status" class="copy-status" aria-live="polite"></span>
</div>
<iframe id="newsletter-preview-frame" class="newsletter-preview-frame" title="Newsletter Vorschau"></iframe>
<textarea id="newsletter-html-source" class="hidden-source" hidden readonly>{{ raw_html }}</textarea>
<textarea id="newsletter-outlook-source" class="hidden-source" hidden readonly>{{ outlook_html }}</textarea>
<textarea id="newsletter-plain-source" class="hidden-source" hidden readonly>{{ plain_text }}</textarea>
</section>
@@ -117,7 +119,8 @@
<section class="card">
<h3>Output: HTML-Quelltext</h3>
<textarea rows="12" readonly>{{ raw_html }}</textarea>
<p class="hint">Bei Problemen mit „Kopieren“: Textfeld markieren (Strg+A) und manuell kopieren (Strg+C).</p>
<textarea id="newsletter-html-display" rows="12" readonly>{{ raw_html }}</textarea>
</section>
<section class="card">