Skip to content

Orca rich markdown editor

Source: www.onorca.dev · State: open/active

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 `BehaviourWhat Orca doesOur 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 toolbarFormatting buttons with active state for the current selectionMdToolbar driven by the catalogue and commandStates; active marks read from the Lezer tree
Bubble menuFloating format strip on a text selectionMdBubbleMenu positioned from anchors.selection.rect
[[ pickerAutocomplete over document pathsExists in the engine; [[note# heading completion is added
Inline image and code previewsRenders images and highlighted code in placeExists: image widget, fence chrome
Table Tab/Enter navigationTab moves between cells; Enter moves to the next rowKeymap 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 blockFold widget over the HTMLBlock; the open attribute is never written
Frontmatter show/hideToggles the YAML block in the editorMdFrontmatterPanel above a body-only editor
Drag block handlesReorder blocks by draggingNot a target; needs a WYSIWYG document model
Rich to raw toggleSwitches to a raw Monaco editorsetMode('live' | 'source') and MdModeToggle
Search over rendered textFind in the rich viewnoteSearch exists; MdFindBar wraps it
Files over 600 KB open rawSkips rich mode on large filessourceModeThreshold (default 600 000 bytes) forces source mode; live mode is refused above it
Round-trip check before rich modeDowngrades to raw when markdown would not survive the rich editorNot 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/.

D-K3EM-markdown-editor-chrome-and-plugin-environment, M-931L


← Back to References