OOratiq

Rich Text Editor

Ready

Formatted text entry with a toolbar.

Installation

$ npx @oratiq-js/ui add rich-text-editor

Copies the component and everything it depends on into your project, then lists the npm packages to install. The code is yours after this.

Usage

import
import { RichTextEditor } from "@/components/ui/rich-text-editor";

Behaviour

  • Built on TipTap (ProseMirror) — the same engine choice as Calendar on react-day-picker: wrap the best, own the surface.
  • HTML in, HTML out via value/onValueChange — sanitise server-side before persisting, as with any rich text.
  • Toolbar buttons keep focus in the editor (mousedown is prevented), announce pressed state, and undo/redo glyphs mirror under RTL.
  • contenteditable inherits the page direction; mixed-direction paragraphs behave natively.

Props

PropTypeDefaultDescription
value / defaultValuestring (HTML)Controlled / uncontrolled content.
onValueChange(html: string) => voidFires on every edit.
placeholderstringShown while empty.
disabledbooleanfalseRead-only, dimmed.

View source on GitHub → components/ui/rich-text-editor.tsx