Right-sidebar Markdown workbench with Read, Live, Source and Split modes: block and visual table editing, live KaTeX preview, safe HTML and table math rendering, configurable viewport virtualization, Quote-to-Chat, DSH plugin slot bridging and turn-picker Save-to-Note.
Install
# from a prebuilt release tarball
dsh plugin --profile web add -w "https://github.com/Bao-qing/dsh-markdown-craft/releases/download/v0.6.0/dsh-markdown-craft-0.6.0.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Bao-qing/dsh-markdown-craft
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Interface Overview

Why dsh-markdown-craft?
DeepSeek Harness's native right sidebar only supports read-only paged previews for .md files. Without introducing iframes, build steps, or third-party plugin coupling, dsh-markdown-craft upgrades the right-sidebar .md / .markdown surface into a local-first Markdown note & AI co-writing workbench.
Core Features
1. Four Native Modes (Read · Live · Source · Split)
- Read: Distraction-free reading view with selection Quote to chat and full plugin content rendering.
- Live (Notion / Obsidian-style):
- Click any paragraph, heading, list, quote, or code block to edit in place (keeping heading typography and quote bars while editing) as surrounding blocks remain rendered.
- Hover the left gutter for
+insert block and⋮⋮drag-and-drop reorder / block menu (Turn into, Insert above/below, Duplicate, Quote block, Edit source, Delete). - Type
/on an empty block to open the Slash Command Menu (supports Chinese, Pinyin, and English filtering). - Select text while editing to bring up the floating Inline Format Bar (
B/I/S/</>/$x$/🔗/Quote). - Toggle
- [ ]task checkboxes directly; auto-saves gently on block commit; full document-levelCtrl/Cmd+ZUndo / Redo stack.
- Source: Full raw Markdown editing with Undo-preserving formatting shortcuts and
FsVersionoptimistic locking. - Split (VSCode-style Content-Aligned Synchronized Scroll):
- Measures true soft-wrapped pixel offsets of every logical line via an offscreen mirror and synchronizes bidirectionally against rendered block anchors; automatically stacks vertically in narrow panes (
< 640px).
- Measures true soft-wrapped pixel offsets of every logical line via an offscreen mirror and synchronizes bidirectionally against rendered block anchors; automatically stacks vertically in narrow panes (
Live editing:

Block actions:

2. Visual Block Editors
- Visual GFM Table Editor: Click any cell to edit (
Tab/Shift+Tab/Enternavigation and auto-row append), add columns/rows from the edges, align columns (left/center/right), insert/delete/reorder rows and columns, and round-trip escaped\|and inline code`a|b`losslessly. - Live Split Equation Editor (
$$...$$): Real-time KaTeX preview above the LaTeX source editor. - Visual YAML Frontmatter (
Page properties): Edit key-value metadata andtagspills just like Notion's top properties (safely falls back to source for nested YAML).
3. Safe README HTML & Table Math Rendering
- Parses common README / OCR HTML (
<p align="center">,<h1 align="center">, local/remote<img>, relative file &#heading<a>,<details>/<summary>,<table>,<kbd>,<sub>/<sup>) viaDOMParserinto a strict allowlisted pure-React tree, supporting allowlistedtext-align(left/center/right) and cleanly hiding HTML comments (rendered as a subtle editable pill in Live mode). - Text inside HTML table cells and safe HTML containers automatically renders inline KaTeX math (
$...$,$$...$$,\(...\),\[...\]) and inline Markdown (bold, italic, strikethrough, inline code, links). - Local relative images load through DSH's authenticated file media route; relative links (such as
README.en.md,LICENSE,file.md#L38) open directly in the right sidebar with source-line navigation;#headinganchors scroll smoothly;<script>,<iframe>,<style>, and allon*event attributes are stripped completely.
HTML rendering:

4. Native DSH Plugin Support (Plugin support)
- Reuses DSH's native
MarkdownBodyrenderer and dynamically bridges any plugins you have installed through native slot protocols:- Mirrors active
conversation.chat.markdown.fenceplugins (math,diff,patch, and any custom fence plugin). - Bridges any installed
tool.call.toolviewplugin through generic```dsh-tool:<toolName>fences—supporting both inline JSON and externalsrc="./assets/dsh-tools/*.json"references so large payloads never clutter your Markdown source.
- Mirrors active
- Turning off the sparkle Plugin support toggle in the header replaces plugin blocks with a clean in-place placeholder card.
Plugin support: works with any plugin that enhances chat output (example below from deepseek-harness-intelligent-ui)
5. AI Chat Integration (Quote to chat & Save to note)
- Quote to chat:
- Drag-selecting rendered Markdown or KaTeX equations automatically pops up Quote to chat (converting selected KaTeX back to clean
$...$/$$...$$TeX source). - Quote whole blocks, tables, or
dsh-tool:*cards directly into DSH's composer as native atomic quote cards with@path Lstart-Lendline anchors (clicking line citations in chat also jumps and highlights the target line across all four modes).
- Drag-selecting rendered Markdown or KaTeX equations automatically pops up Quote to chat (converting selected KaTeX back to clean
- Turn-Picker
Save to note:- Click the save-to-note icon on any finalized AI reply to open the turn picker—freely select full turns, individual AI replies, plugin tool views, or your own prompts to create or append to a
.mdnote (large tool payloads automatically externalize to./assets/dsh-tools/*.json). - Also exposes the shared
md_craft_export_noteagent tool.
- Click the save-to-note icon on any finalized AI reply to open the turn picker—freely select full turns, individual AI replies, plugin tool views, or your own prompts to create or append to a
Chat integration:

6. Large-Document Virtualization & Prerender Settings
- Built for long documents with hundreds of blocks, dense KaTeX equations, and embedded images (such as PDF/OCR exports):
- Shared
IntersectionObserverviewport lazy mounting + CSScontent-visibility: autoisolation, Read-mode contiguous prose coalescing, memoizedStudioBlockRowwith on-demand gutter SVGs, content-stable React keys, cached anchor-pair Split scroll sync withrAFthrottling, and fence-scopeddata-chat-flow-kindmarkers.
- Shared
- Open Settings → Plugins → Installed → Markdown craft to tune the Rendering & prerender performance card live:
- Switch between Low memory / Balanced / Heavy prerender presets or adjust scroll overscan blocks, initial prerender counts, prefetch viewport margin, keep-mounted toggle, virtualization threshold, Read group cap, and Split debounce delay (applied immediately and persisted via
.volatile()Host config without restarting the plugin).
- Switch between Low memory / Balanced / Heavy prerender presets or adjust scroll overscan blocks, initial prerender counts, prefetch viewport margin, keep-mounted toggle, virtualization threshold, Read group cap, and Split debounce delay (applied immediately and persisted via
Requirements
- DeepSeek Harness:
>= 0.2.2-rc.3 - Node.js:
>= 22.13.0
Installation
From GitHub
In DeepSeek Harness, open Settings → Plugins → Add plugin and enter the repository URL (or a Release .tgz URL):
git+https://github.com/Bao-qing/dsh-markdown-craft.git
From a local directory
git clone https://github.com/Bao-qing/dsh-markdown-craft.git dsh-markdown-craft
In DeepSeek Harness, open Settings → Plugins → Add plugin and select the cloned dsh-markdown-craft directory.
Generic dsh-tool:<name> Syntax
Inline JSON (good for compact payloads):
```dsh-tool:my_tool title="Summary"
{"title": "Summary", "value": 42}
```
External JSON resource (recommended for large payloads):
```dsh-tool:my_tool src="./assets/dsh-tools/my-tool-card.json" title="Summary"
```
Development & Testing
Zero external dependencies and zero build step:
npm run lint:syntax # Check index.js & client.js syntax
npm test # Run native node:test unit suite (client parser + Host routes & tool)
npm run check # Syntax + tests + npm pack --dry-run
License
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10703
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 10703
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 8557
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7523
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
omdsh-dev/DSH-better-sidebar★ 5405
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1091
Interactive UI components rendered inline in replies: layout, charts, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.