The Self-Editing Document

This page rewrites itself. Drag a rectangle over any part of this document, type an instruction in the sidebar, and an LLM job will replace the selected fragments in place.

How selection works

While you drag, the page walks its own DOM tree and tests each element's bounding box against your rectangle. Fully contained elements win; if nothing is fully contained, intersecting elements are used instead. Parents absorb their children, so you get the topmost sensible units.

Every element here carries a data-edit-id, which is how edits stay addressable across rewrites.

Some material to edit

The quick brown fox jumps over the lazy dog. This sentence exists purely to be rewritten, restyled, translated, or deleted. Try selecting it and asking for pirate speak.

A table, for structural edits

ComponentStatus
Selection engineworking
Job queueworking
Voice inputphase two

Closing note

Undo restores a snapshot of the whole document taken before each job, so experimentation is cheap. The event log on the left shows selection and job events as they fire.