Skip to content
Forms

Rich Text Editor

Tiptap WYSIWYG editor with a formatting toolbar and HTML output.

Import

tsx
import { RichTextEditor } from "@cronus-ui/ui";
bash
npx cronus-ui add rich-text-editor

Examples

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
default.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component RichTextEditorDefault layout:inline style:rich-text-editor {
  aria-label:"Post body"
  label "Write something…"
  text "Write something…"
}

page "/audit/rich-text-editor/default" type:custom {
  use RichTextEditorDefault
}

API Reference

Generated from the component's exported types.

RichTextEditorProps

Skip RichTextEditorProps props table
PropTypeDefaultDescription
value
string—Controlled HTML value. When provided, external changes are synced into the editor.
defaultValue
string—Uncontrolled initial HTML content. Ignored once the editor has mounted.
onChange
(html: string) => void—Called with the serialized HTML whenever the document changes.
placeholder
string—Placeholder shown while the document is empty.
editable
booleantrueWhether the content is editable. Defaults to `true`.
className
string—Extra classes for the editor shell (toolbar + content wrapper).
aria-label
string—Accessible label for the editable region.