Agents In Use
What’s new todayLast update
499 additions

How to use Claude to build a document editor

HawkDoc combines Lexical editing with React, collaborative-sync infrastructure, and Markdown, HTML, and PDF export. Its author credits Claude Code for early editor integrations and export development.

TRY A BOUNDED VERSION

Prompt to try

Editorial adaptation, not the source author’s exact prompt. Replace bracketed inputs and review tool permissions first.

Help build [document editor] using Lexical and React. Implement [editing features] and integrate [export formats], including client-side PDF export through @react-pdf/renderer. Track implemented features separately from [unfinished collaboration and workspace features].

What happened

The author reports working block editing, slash commands, template chips, image uploads, auto-save, and Markdown, HTML, and PDF export, while several interface and import features remain in progress.

Reported by ellizabeth on Hacker News

How the agent did it

  1. Started HawkDoc after encountering SuperDoc customization and performance limitations.
  2. Built editor integrations with Claude assisting a large part of development.
  3. Developed the export pipeline with Claude Code assistance.

Where a person stepped in

The author lists working and unfinished features but does not describe code review or testing procedures.

A person guided the agent closely as it worked.

HawkDoc's author started building a document editor after finding SuperDoc difficult to customize and insufficiently performant for the project. Claude served as a coding assistant for a large part of development, with Claude Code specifically credited for accelerating early editor integrations and the export pipeline.

The implementation uses Lexical as its editor engine and React with TypeScript for the interface. For collaborative syncing, the described architecture uses Yjs and Hocuspocus. Yjs deltas go first to Redis, then are flushed to PostgreSQL every 30 seconds, avoiding database writes for every keystroke. Client-side PDF export uses @react-pdf/renderer and supports watermarks.

The author lists working features including block editing, slash commands, template variables displayed as chips, image uploads, auto-save, a selection bubble menu, and Markdown, HTML, and PDF exports. Several surrounding features remain unfinished: the collaboration interface, document workspace, DOCX import, version history, and authentication interface. The JWT backend is described as implemented. The post does not provide measured latency results for its fast-typing goal. Who it's for: developers building customizable document tools who want agent assistance with editor integration and export work.

Prompt
Suggested prompt (written by Agents In Use, not the author's)

Source: Hacker News · ellizabeth

Frequently asked questions

Which parts did Claude Code help develop?

The author credits Claude Code with speeding up early development, particularly editor integrations and the export pipeline, and says Claude assisted with a large part of development.

Which features were still unfinished?

The post lists the real-time collaboration UI, document workspace and file list, DOCX import, version history, and authentication UI as in progress. The JWT backend was already implemented.

More details

About this account

Claude acted as a coding assistant for a large portion of development, especially early integrations and the export pipeline.

Platform: Hacker News. Attribution: https://news.ycombinator.com/item?id=47309070. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.

Credit: ellizabeth on Hacker News

Source published 9 Mar 2026

Source checked 14 Oct 2026

Tools and topics

Claude Code · Lexical · Yjs · Hocuspocus · Redis · PostgreSQL · React · @react-pdf/renderer

Document editor · Lexical · PDF export

Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.