Rich Editor

A rich editor is a text surface where formatting belongs to the text itself rather than being typed as markup: bold, headings, lists and quotes live in the document, and the toolbar reports what is under the cursor. Orvain's Rich Editor family holds six, a document page with its toolbar pinned above, a comment thread whose composer sits under the replies, a page whose formatting pill follows the selection, and three toolbars on their own: one pill carrying everything, a large-control row for touch, and a segmented pair that splits type settings from formatting.

Buttons are the small half of this component. The work is in the round trip: the toolbar has to re-read the selection on every cursor move, and a control that takes focus when pressed collapses the selection it was meant to act on, so the controls have to refuse focus rather than claim it. Paste is the other half. Text arriving from elsewhere carries styles your document has no rules for, and an editor without a paste filter slowly fills with fonts nobody chose.

6 blocks

Document editor

Docs, knowledge bases, long-form writing: a page with its toolbar on top

Comment thread

Reviews and discussions where the reply matters most: read the thread, answer with full formatting

Floating toolbar

Distraction-free writing: formatting appears where you select, not at the top

Basic toolbar

The full formatting row as a pill: pin it above any editor

Large toolbar

Touch and focus modes: big controls grouped in capsules above the task they drive

Segmented toolbar

Two pills (type settings on the left, formatting on the right) for wide editors

01

Using Rich Editor

Reach for it when

  • Long-form content read as a page: documentation, articles, release notes.
  • Replies where a quote or an @mention changes what the sentence means.
  • Authors who will never learn markup and should not have to.
  • A writing surface meant to stay clean until the writer selects something.

Reach for something else when

  • Text engineers will review in a diff. Markdown in a plain field stays readable in version control; rich output does not.
  • A single line with no formatting, such as a title. Use a text input and keep its validation, placeholder and autofill.
  • Content that must render identically in email or PDF. Restrict authors to a small named set of styles, or build it from a template.
02

Where it shows up

01

Knowledge base article

An internal handbook page where the author needs headings for structure, a checklist for the procedure and a quote for the caveat. Whatever a reader later searches for has to survive being pasted in from somewhere else.

02

Review thread

Comments on a document, where each reply can bold the term under discussion, quote the line it answers and tag whoever owns it. The composer stays inline under the thread rather than opening a modal.

03

Issue description

A task body written once and read many times: a summary, bulleted steps to reproduce, a link to the build. The formatting row sits underneath so the field opens on the text, not on its controls.

04

CMS body field

A marketing surface where a non-technical editor writes into a field the layout owns. The editor offers the marks the template renders and nothing more, so the page cannot be broken from inside the CMS.

03

Questions

When should I use a rich editor instead of a Markdown field?

Use rich editing when the author's job is writing rather than engineering, and when what they see while typing has to match what publishes. Use Markdown when the text is reviewed as source, versioned alongside code, or written by people who already know the syntax. The tell is the audience: content maintained by engineers ages better as plain text.

How should a rich editor handle pasted content?

All blocks
The Orvain Dispatch

Premium components, free in your inbox.

Join the Orvain Dispatch and get production-ready components, free to keep: React and Vue code plus the Figma frame, yours to ship.

Just components, never spam. You can unsubscribe anytime.