From 10a8658b67ba2899cabb2a32f413ddeb336252c7 Mon Sep 17 00:00:00 2001 From: NguyenND Date: Fri, 24 Jul 2026 09:55:41 -0400 Subject: [PATCH] Jul 24 - Update Rich-text editor to support uploading images and inserting table --- .claude/settings.json | 14 + .gitignore | 2 + CLAUDE.md | 33 +- README.md | 15 +- admin.py | 56 ++ app.py | 20 +- static/css/admin.css | 14 + static/css/style.css | 5 + static/uploads/.gitkeep | 0 static/vendor/quill.min.js | 15 +- static/vendor/quill.snow.css | 947 +------------------------------- templates/admin/topic_form.html | 74 ++- 12 files changed, 227 insertions(+), 968 deletions(-) create mode 100644 .claude/settings.json create mode 100644 static/uploads/.gitkeep diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..c78aa47 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,14 @@ +{ + "permissions": { + "allow": [ + "Bash(curl -sSL -o /tmp/qtest.txt -w \"quill2: %{http_code} size:%{size_download}\\\\n\" https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.min.js)", + "Bash(curl -sSL -o quill2.min.js -w \"js: %{http_code} %{size_download}\\\\n\" https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.min.js)", + "Bash(curl -sSL -o quill2.snow.css -w \"css: %{http_code} %{size_download}\\\\n\" https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.snow.css)", + "Bash(mv -f quill2.min.js quill.min.js)", + "Bash(mv -f quill2.snow.css quill.snow.css)", + "Bash(mkdir -p static/uploads)", + "Bash(touch static/uploads/.gitkeep)", + "Bash(py --version)" + ] + } +} diff --git a/.gitignore b/.gitignore index 03845ee..6763694 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,6 @@ instance/ *.db static/img/ static/vid/ +static/uploads/* +!static/uploads/.gitkeep logs/ diff --git a/CLAUDE.md b/CLAUDE.md index be7fb0b..aebebf6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -106,16 +106,28 @@ shows only `is_published` topics (sections with no published topics are hidden). ## Content editing (rich text / publish / reorder) -- **Rich text:** Quill 1.3.7 vendored at `static/vendor/` (no CDN — survives a - locked-down server or strict CSP). It's a *progressive enhancement over a real - `