Skip to content

[Feature]: First-class Markdown reading — dialect parity (wikilinks/callouts/front matter), mermaid source folding, user-styled preview #44539

Open

Description

@EdgerHao

The problem

Orca agents read and write Markdown all day — plans, notes, READMEs, review docs, AGENTS.md/CLAUDE.md conventions. The rich editor has grown a Notion/Obsidian-style editing experience, but the reading side lags behind, so users keep dropping out to Obsidian or VS Code just to read the files their agents produce:

Proposal

1. Dialect parity in the built-in preview (P0)

  • Obsidian-style [[wikilink|alias]] rendered as internal links, resolved against the workspace, click-to-open; graceful plain-text fallback outside vault-like workspaces (open design question below)
  • Callouts: GitHub's five types, plus Obsidian's collapsible callouts
  • Front matter rendered as a properties card
  • ==highlight==, definition lists, footnote back-references

Most of this already exists as markdown-it plugins — the preview is markdown-it based, same as VS Code's built-in preview: @binyamin/markdown-it-wikilinks, markdown-it-obsidian-callouts (reuses Obsidian's element structure and CSS class names, so theming carries over), markdown-it-ins, markdown-it-deflist.

2. Mermaid: render, then fold the source (P0)

The diagram replaces the fence; the source moves into a collapsed <details> (click to expand / copy); render failure falls back to showing the source block. This is what GitHub and Markdown Preview Enhanced do — the two references VS Code users know. Would also pair well with the full-size viewer asked for in #8731.

3. User styles for the preview (P1)

A VS Code-style setting: a list of CSS URLs / workspace-relative paths injected into the preview (styles only, no scripts, restricted-workspace setting). Obsidian theming is pure CSS over a stable DOM — this one setting is the cheapest way to let everyone make the preview feel like home.

4. Keep the preview plugin-ready (P1)

customEditors shipped in 1.4.245 and the community already built a Markdown reader on it within days (sumonta056.better-markdown-preview). Two asks:

  • Publish docs for the manifest v2 customEditors extension point and the orca.document.session protocol (value / readOnly / change / onReplace + merge) — the JSON schema under docs/schemas/plugins/ is a great start; the session protocol currently has to be learned from reading other plugins' source
  • Consider a workspace file-list capability so viewer plugins can resolve [[wikilinks]] and build backlinks themselves

Open design question

[[wikilinks]] outside Obsidian-style vaults: resolve by filename within the repo? Only when the workspace opts in (e.g. a .obsidian/ folder is detected)? Degrade to plain text? A sensible default plus a per-workspace override would cover most cases.

Related

#242, #3040, #3363, #8441, #8708, #8731, #9858, #11901, #28574, #29867, #13225

Happy to consolidate: this issue is meant as the umbrella for "make reading Markdown in Orca first-class"; the single-point issues above stand on their own.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions