v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

RichTextEditor

Edit Markdown and see a safe formatted preview.

Interactive preview

Ready to build

Make every detail your own.

Usage

import { RichTextEditor } from "@devvy-ui/react";

<RichTextEditor label="Release notes" name="notes" defaultValue="## Ready to build" />

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
value / defaultValuestringemptyMarkdown source.
onValueChange(source: string) => void—Edited source callback.
previewbooleantrueSafe formatted preview.

Accessibility & behavior

Platform Behavior & Guidelines

A Markdown-source editing model with selection-aware formatting buttons and safe React preview. Native textarea IME, text selection and form behavior remain available. No contenteditable HTML or arbitrary HTML execution.

Source ownership

Run npx @devvy-ui/cli init once in your React project, then add the source:

npx @devvy-ui/cli add rich-text-editor

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

RichTextEditor.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.