Editor
typress's editor is a custom contentEditable surface. Post bodies are stored as a JSON block tree, not HTML. Each block's attrs are re-validated with Zod at render time, so editing a row directly in SQLite still can't introduce XSS.
Bundled blocks
- core/paragraph — paragraph
- core/heading — H1–H6
- core/list — ordered / unordered
- core/quote — blockquote
- core/code — code block with optional language
- core/separator — horizontal rule
- core/image — image
- core/video — MP4 / WebM uploads
- core/gallery — 2–5 column image gallery
- core/cover — full-bleed cover
- core/button — button (javascript: hrefs are blocked)
- core/columns — 2–4 columns with selectable ratios
- core/embed — YouTube / Vimeo (provider allowlist)
- core/raw-html — always sanitised through DOMPurify
Right sidebar settings
- Featured image — used for OG / Twitter card / archive thumbnail
- Layout — Default (centred 720px) or Wide (theme's max width)
- Hide page title — pages only;
Shortcuts
- / — block insert menu
- Cmd+B / Ctrl+B — bold
- Cmd+I / Ctrl+I — italic
- Cmd+Z / Ctrl+Z — undo
- Backspace at start of empty block — delete block
Media uploads
Inserting an image / video / gallery from the slash menu opens a file picker. Uploaded files are MIME-sniffed by magic bytes; SVGs are sanitised through DOMPurify's SVG profile before storage. Files are deduplicated by SHA-256, so uploading the same file 100 times costs disk space once. Upload safety is covered in more detail in Security.