feat(training): rich-text lessons with inline images and 25 MB manuals
CI / build (push) Has been cancelled

Admins were authoring plain-text lessons, which made illustrated tutorials
and reordering images impossible. Lesson bodies are now sanitized HTML from a
Tiptap editor with alignment, sizing, drag-reorder and alt text, and inline
images reuse the training_resources table so no migration is needed.
Attachments grow to 25 MB, PDFs stream inline, and SVG is rejected because it
can execute as a document. Legacy plain-text bodies are normalized on read.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-20 12:18:24 +00:00
parent e8759cdee8
commit cb5976edb2
18 changed files with 1799 additions and 114 deletions
+17 -6
View File
@@ -677,20 +677,31 @@ export default function AdminGuidePage() {
the published lessons.
</GuideStep>
<GuideStep>
Add a title, one-line summary, and the lesson body. Line breaks are
preserved, so numbered steps stay readable.
Add a title and one-line summary, then build the lesson in the
content editor. Use headings for sections, numbered or bulleted
lists for procedures, and links for related pages.
</GuideStep>
<GuideStep>
Press the image button to upload a screenshot. Select the image to
align it left, center, or right, choose a width, edit its
description, or move it up and down. You can also drag the image to a
new position in the lesson.
</GuideStep>
<GuideStep>
Set a sort order to control the list position. Lower numbers appear
first.
</GuideStep>
<GuideStep>
Publish when ready. Drafts are visible only to admins.
Publish when ready. Drafts are visible only to admins. If you add an
image before the first save, the app creates an unpublished draft so
the file has a lesson to belong to; finish and save normally.
</GuideStep>
<GuideStep>
Attach a PDF, image, or document with the file control on the lesson,
then <strong>Upload</strong>. Volunteers open attachments from the
lesson; admins can remove them.
Attach a PDF manual, Word document, Markdown file, or text file with
the file control beneath the lesson, then press{" "}
<strong>Attach</strong>. PDFs open in the browser and the other
formats download. Volunteers see documents at the end of the lesson;
admins can remove them.
</GuideStep>
</GuideSteps>
<GuideCallout title="The two long guides are built in" tone="tip">