demo · v139

Inline Corrections

The Proofreader API returns a structured list of corrections — type, range, replacement. This demo wires that into an inline editor: type on the left, see corrections marked and listed on the right. Falls back to a rule-based proofreader so the page works without the on-device model.

v139 ships the Proofreader API behind chrome://flags/#proofreader-api (and origin trial). Without the flag this page uses a small built-in rule set so the interaction is visible everywhere — the markup output and corrections shape match the real API.
click Proofread

your text

corrected preview

corrections list

the code

const proof = await Proofreader.create({
  expectedInputLanguages: ["en"],
});

const result = await proof.proofread(text);
// result.correctedInput — fully corrected string
// result.corrections    — array of { startIndex, endIndex, correction, type }

renderCorrections(result.corrections);

see also