fetaUI
GitHub

Rich Text Editor

Short structured writing that exports clean Markdown and HTML.

FreeWeb and MobileMotion

Preview

npx shadcn add @fetaui/rich-text-editor
Playground
0 WORDS

Release notes

Version 2.4 ships Thursday. Select any text to format it, or type / on an empty line for blocks.

What changed

  • Exports stream up to one million rows
  • Shared views keep their filters
  • Comments on dashboards
Keep the public note under 120 words.
Empty
0 WORDS


Icons animation
Motion

Installation

Terminal· bash
 npx shadcn add @fetaui/rich-text-editor

Accessibility

  • A textbox with aria-multiline, and the format bar is a toolbar with pressed states.
  • Pasted content comes in as plain text. Exports keep only known tags and safe links.

Motion

  • The format bar rises 4 px and scales from 0.96 in 140 ms, with bold, italic, code, heading, quote, list and link.
  • The block menu drops 4 px in 160 ms.
  • Copy says Copied for 2 s and the word count rolls.
  • With reduced motion, the bar and menu fade.

Responsive behavior

  • A 330 px source panel on Web. On Mobile it hides, and the format tools sit in a row on the tray.

Performance

  • A native contentEditable with no editor dependency.
  • The selectionchange listener and copy timer are removed on unmount.

Note for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Import RichTextEditor. Props: label, placeholder, source, onChange, animated, with first content as children.
  • Children render once, as h1, h2, p, ul, blockquote and pre. It is not a controlled input.
  • onChange receives { markdown, html }. Sanitize stored HTML before you show it elsewhere.
  • Formatting, slash menu blocks, Markdown shortcuts and Clear all go through document.execCommand, so Undo steps back through each. Paste is reduced to plain text.

Related