feat: text colour, font size and headings in the document editor

↗ view on GitHub · Ethan Ward · 2026-08-18 · 49a6b5a3

Extends the in-app Word editor with the formatting controls a letter
actually needs, all written back into the real .docx:

- Text colour and font size, applied to the selected text. Only text the
  user styled carries colour/size - the serializer reads them from spans
  the toolbar marked rather than from computed style, so untouched text
  keeps the document's own formatting.
- Heading 1-3 via a paragraph-style dropdown, applied as w:pStyle so Word
  treats them as real headings (navigation pane, outline level). Choosing
  "Body text" clears the style again.
- Heading styles the document does not define are added to styles.xml
  with a sensible default; a document that already defines them (a firm
  template) keeps its own look untouched.

Verified end to end in the browser: colour and Heading 2 both persisted
into the saved document, with the heading style defined and text intact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018RCY6K4dNwdbo9gU3HQ9un
Repository wardethan2000-eng/mike
Author Ethan Ward <ethanward321@hotmail.com>
Authored
Parents 3823eeb9
Stats 3 files changed , +467 , -19
Part of In-app DOCX editor

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-49a6b5a3.md from inside the repo you want the change in.

⬇ Download capture-commit-49a6b5a3.md