Orca rich markdown editor
Source: www.onorca.dev · State: open/active
Summary
Section titled “Summary”Orca’s markdown editor is the UX bar for the markdown editing program (M-931L): a slash menu
on /, a fixed formatting toolbar, a bubble menu on selection, a `Behaviour | What Orca does | Our target |
|---|---|---|
Slash menu on / | Opens a command list at the cursor; picking an item inserts the block | @codemirror/autocomplete source over the command catalogue, the same mechanism as [[ |
| Fixed toolbar | Formatting buttons with active state for the current selection | MdToolbar driven by the catalogue and commandStates; active marks read from the Lezer tree |
| Bubble menu | Floating format strip on a text selection | MdBubbleMenu positioned from anchors.selection.rect |
[[ picker | Autocomplete over document paths | Exists in the engine; [[note# heading completion is added |
| Inline image and code previews | Renders images and highlighted code in place | Exists: image widget, fence chrome |
| Table Tab/Enter navigation | Tab moves between cells; Enter moves to the next row | Keymap over the Lezer Table node; inactive tables render as a widget from renderToHtmlSync; in-cell WYSIWYG editing is not a target |
Toggle blocks (<details>) | Collapsible block | Fold widget over the HTMLBlock; the open attribute is never written |
| Frontmatter show/hide | Toggles the YAML block in the editor | MdFrontmatterPanel above a body-only editor |
| Drag block handles | Reorder blocks by dragging | Not a target; needs a WYSIWYG document model |
| Rich to raw toggle | Switches to a raw Monaco editor | setMode('live' | 'source') and MdModeToggle |
| Search over rendered text | Find in the rich view | noteSearch exists; MdFindBar wraps it |
| Files over 600 KB open raw | Skips rich mode on large files | sourceModeThreshold (default 600 000 bytes) forces source mode; live mode is refused above it |
| Round-trip check before rich mode | Downgrades to raw when markdown would not survive the rich editor | Not needed: the text is the document, so nothing is lost; the swap-writer corpus asserts it |
Orca is Tiptap v3 (React) with @tiptap/markdown (marked-based); its chrome is shadcn/Radix,
Floating UI and cmdk. The round-trip check exists because a ProseMirror document normalizes
markdown on save. We adopt the behaviours, not the engine; the engine choice and its
alternatives are in [[D-K3EM-markdown-editor-chrome-and-plugin-environment under Options
considered. Sources: the Orca rich markdown docs
and the stablyai/orca repository under
src/renderer/src/components/editor/.
Cited by
Section titled “Cited by”D-K3EM-markdown-editor-chrome-and-plugin-environment, M-931L