Skip to content
Back

Rich text editorPro

A lightweight editor with markdown shortcuts, a floating toolbar with a link face, a slash menu, its own undo and redo, and clean HTML and Markdown out.

oxyn add rich-text-editor
No changes
Launch notes
We ship Thursday. Read the checklist and the runbook.
•Freeze main at noon
•Run the smoke tests
Keep the rollback ready.
Type to see the output…
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • A lightweight block editor drawn by Oxyn (no contentEditable) on kit::compose::Doc.
  • Markdown shortcuts at a line start (# , ## , ### , - /* , 1. , [] , > , ``` ` ``, ---).
  • Marks: bold, italic, strikethrough, inline code (within one block) and links, toggled on the selection or for the next typed text.
  • Selecting text (Shift+arrows, Home/End, or dragging) shows a floating toolbar over the line; its face swaps to a link field (⌘K or the link button). /` after a space or at a line start opens the block menu, which filters as you type; ↑ ↓ move, Enter or Tab chooses, Escape closes.

When not to use

  • Prompt composer with model picker, voice input, app connections and approval request: use Chat Composer instead.
  • The model menu of an AI chat: use Model Picker instead.
  • The prompt box for an agent, in six layouts: use Composer instead.

Installation

Rich text editor is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add rich-text-editor

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Default

Select text for the toolbar; type / for blocks.

No changes
Launch notes
We ship Thursday. Read the checklist and the runbook.
•Freeze main at noon
•Run the smoke tests
Keep the rollback ready.
Type to see the output…
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Html

Clean HTML out, with custom undo buttons.

No changes
Launch notes
We ship Thursday. Read the checklist and the runbook.
•Freeze main at noon
•Run the smoke tests
Keep the rollback ready.
Type to see the output…
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Empty

Empty: placeholder and the block hint.

Start writing
Type to see the output…
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

RichTextEditor

PropTypeDefaultDescription
markdownStringDefault::default()Starting content as Markdown.
placeholderString"Start writing"Shown when empty.
block_hintString"Type / for blocks"Hint on an empty line holding the caret.
read_onlyboolDefault::default()No editing, toolbar or shortcuts.
history_barboolDefault::default()Undo and redo buttons above the editor.
labelString"Editor"Accessible name.
on_changeEventHandler<(String, String, String)>—After each edit: HTML, Markdown and plain text.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
⌘Bor⌘Ior⌘⇧Xor⌘EBold, italic, strike, code
⌘KLink the selection
⌘Zor⌘⇧Zor⌘YUndo / redo
/Block menu (↑ ↓ Enter Tab Escape)
TaborShiftTabIndent a list item; two spaces in code
EnterorShiftEnterNew block / line break

Accessibility

  • role=textbox with aria-multiline; toolbar buttons expose aria-pressed.
  • Reduced motion jumps the toolbar and fades the menus.
From the spec
  • role=textbox, aria-multiline; toolbar buttons have aria-pressed; the slash menu is a listbox.

Motion & interaction

Timing
  • Toolbar glides 200 ms with the selection; faces crossfade 160 ms; slash highlight glides 140 ms.
  • Reduced motion jumps the toolbar and fades the menus.

Responsive behaviour

  • Fills its container up to 560 px.
Edge cases (spec)
  • Fills its container up to 560 px.

Notes for AI

  • Import RichTextEditor from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: RichTextEl in oxyn_gpui.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI