All projects

Foli

Foli is an open-source document-editing engine for the web, built from the ground up: its own document model, transactions, view and layout, designed around real pages instead of an endless scroll, with first-class React integration.

Period
November 2026–Present
Domain
Document editing · Web
Tools
TypeScript · React · Vitest · Playwright

An editor built around pages

Foli does not sit on top of ProseMirror, Tiptap or Lexical. Paragraphs split across pages at a line, with explicit page breaks, widow and orphan control, keep-with-next and keep-lines-together rules. Reflow is incremental, each section has its own page size and margins, and printing gives one sheet per page.

A two-page mutual NDA imported from .docx and paginated by Foli, with numbered clauses, nested lists and a signature block.
A .docx contract, paginated

Word's model, not an approximation

Documents follow Word's model: paragraph styles, numbered lists, fonts, spacing, indents and character formatting. Pasting from Word, Google Docs or web pages maps into that model, and .docx files import and export losslessly: what the editor does not model yet is kept and written back.

Foli playground with the formatting toolbar over an A4 page of headings, character formatting, nested lists and aligned paragraphs.
Formatting on a real page

Usable as a library

A headless core with no DOM, a framework-agnostic editable view, React components with a toolbar and server rendering, and a .docx package. Foli is published on npm, and Word-compatible tracked changes and comments are next.