From 5bed92026624627900e3593358416cb69c1ee011 Mon Sep 17 00:00:00 2001 From: Wolf Beckmann Date: Fri, 27 Mar 2026 10:08:11 +0100 Subject: [PATCH] feat(diarization-ui): add inline document editor Adds an edit mode to the document view: click "Bearbeiten" to switch from rendered Markdown to a monospace textarea, save via POST /document/{id}/edit, or cancel to discard changes. Co-Authored-By: Claude Sonnet 4.6 --- app.py | 54 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/app.py b/app.py index 19b813a..b1ba828 100644 --- a/app.py +++ b/app.py @@ -754,22 +754,55 @@ def view_document(doc_id: int): rendered = md.markdown(d["content_md"] or "", extensions=["fenced_code", "tables", "nl2br"]) projects = get_projects() + content_escaped = (d['content_md'] or '').replace('`', '`').replace('', '<\\/script>') body = f"""

Dokument #{d['id']} – {d['title']}

Projekt: {d['project']} · Typ: {d['kind']} · {d['created_at']}
-
- ⬇️ - ✏️ - 📁 - 🗑️ +
+
+ + + + + +
+
+ + +
-
{rendered}
+
{rendered}
+
+ +