UI
← Home

Text Editor

A multiline contenteditable editing surface with an application-managed undo/redo history: Ctrl/Cmd+Z undoes and Ctrl/Cmd+Shift+Z (or Ctrl/Cmd+Y) redoes, and a new edit after undoing discards the redo stack. A run of typing is one step — undo takes back the word, not the letter — and a pause ends it.

  • Axe
  • Focus
  • Undo
  • Paste

Preview

Installation

npx shadcn@latest add https://ui.publictheta.com/r/text-editor.json

Conformance

Verified against the @publictheta/ui-spec text-editor specification on both the React and vanilla reference implementations, across Chromium, Firefox, and WebKit.

  • Axe No WCAG 2 A/AA axe-core violations
  • Focus A visible focus indicator appears on keyboard focus (WCAG 2.4.7)
  • Undo What it destroys or moves comes back: Cmd/Ctrl+Z takes the last change back and announces it, Cmd/Ctrl+Shift+Z does it again, and a run of like changes is one step
  • Paste A paste lands: the widget takes the richest flavour it understands, never injects markup it did not ask for, and pastes as plain text on Shift+Cmd/Ctrl+V

See the full conformance matrix across all components.