11-Jun-2026 — write committee documents on the website, themed to your group (#281)

build 686commit 313651c


committee: compose themed committee documents in TipTap as an alternative to file attachments (#281)

Committee documents can now be written directly on the website in a rich-text editor and rendered through a group-themed template, instead of being styled by hand in Word, exported to PDF and uploaded. Uploads keep working unchanged; this is an additional option, not a replacement. Delivers all four requirements of #281, and works for any group out of the box because every themed element is driven from the group's existing configuration.

In plain English

A composed document as readers see it: discrete A4 pages on a viewer backdrop, the group paper-cut band and logo, yellow-highlighted headings, a breadcrumb that leads straight back to the source page, and Back and Print / A4 buttons.

Why this was needed

The write in Word, style by hand, export to PDF, upload round trip baked the official look into every file at the moment it was exported. Nothing could be re-themed later, there was no online-friendly version, and the most error-prone part, reproducing the logo, header and charity footer correctly, was repeated manually for every document. The ticket asked for the styling to be defined once per group, with the author writing only the content, and for two render modes (web and A4 print) from the same stored text.

How to compose a document

Choose Compose document instead of Upload attachment when adding a committee file. The date and file type fields work exactly as before, and the toolbar carries Table and Page break buttons.

Writing a document: headings show their yellow highlight as you type, and with the cursor inside a table the toolbar grows row and column controls, including moving a whole column left or right.

Preview shows the document exactly as readers will see it, rendered through the group template. This sample exercises the formatting available to authors - a highlighted title, bold and italic text, bulleted and numbered lists, a quote, a link, a table and a page break - with the group band, logo and charity footer applied automatically.

Working with tables

Page breaks

The page break appears in the editor as a dashed marker that cannot be edited - only selected and deleted, exactly like Word's page break.

How to convert an existing Word or PDF document

Convert to editable document appears on any uploaded Word or PDF committee file, alongside View in new tab and Download.

After clicking Convert to editable document, the compose editor opens pre-filled with the converted content - here a PDF agenda, its headings already highlighted, ready to edit and save as a composed document

Viewing, printing and emailing

Uploaded files open embedded in the website at a readable address, with the breadcrumb and a Back button - readers never see raw storage links.

What the template uses, and how to change it

The template needs no configuration of its own, it is built entirely from settings each group already has, so it works for every group with nothing to set up:

Changing any of those re-themes every composed document automatically. The charity registration small print and Fundraising Regulator badge are the national Ramblers wording that applies to every group, matching the site footer. A templateId field is stored on each document so further templates can be added later without reworking the data.

Technical changes

Tests

Sixty-five server tests cover the conversion pipeline, including an end-to-end Word conversion built from a real .docx in memory that asserts embedded hyperlinks survive as markdown links (PDF text carries no hyperlink data, so links there remain plain URLs), a Word table conversion asserting header, separator and data rows with an email address retained, and regression cases taken directly from converted real-world agendas and minutes. The full server suite passes, with frontend lint, TypeScript checks and standalone Sass compilation of the new components' styles all clean.