dsh-markdown-typora
Typora-style Markdown editor for the DSH right sidebar: live math and Mermaid rendering, click right of an image to keep writing on the next line, Ctrl/Cmd+S with version-guarded saves that also work outside the session workspace, and selections inserted into chat with their absolute file path.
Install
dsh plugin --profile web add dsh-markdown-typora
Sandbox test
This plugin has not been tested yet. Submit a test →
README
dsh-markdown-typora
A Markdown editor for the DeepSeek Harness right sidebar, built on MarkPilot CM6 3.6.17.
Write Markdown in DSH with Typora-style live rendering; select a passage and send its Markdown source straight into the current conversation.
Screenshots
Selection → chat, inside DSH<br> · A formula block, Typora-style — click a glyph and the source caret lands on it<br>
Notion dark<br> · 护眼米黄 (sepia light)<br>
9 themes, switchable from the toolbar<br> · A selection that crosses inline formulas<br>
Table cells are real cells<br> · Images render in the document<br>
Beyond Typora, inside DSH
- Click a formula to edit its source — block and inline math expand to the editable
$…$source in place, and return to the rendered form when the caret leaves. - Selections keep formulas whole — a selection that crosses inline math carries complete formulas; copy and cut hand back the Markdown source, not the rendered glyphs.
- Table cells, not table text — an alignment toolbar appears over the table, with row/column operations, escaped pipes, Chinese IME composition and undo/redo kept in sync with the cell source.
- Ten built-in themes — 宋韵 (dark, light and the restored V2 deep-blue), Notion (dark/light), Solarized (dark/light), GitHub dark, 护眼米黄 and 柔和淡绿. Follow the host, or pick one from the toolbar.
- Live Mermaid, KaTeX and the Markdown worker, all offline — diagrams, math and fonts load from the plugin; there is no CDN in the path.
- Large documents — the Markdown syntax tree is built in a web worker, so a 150,000-character document loads and accepts typing without the UI thread parsing it.
- Selection → chat — the DSH-specific move: the selection's Markdown source goes into the current conversation from the floating button or
Ctrl/Cmd + Shift + Enter. - Guarded saves — version-checked writes, a conflict banner instead of an overwrite, and a recovery slot when a tab closes with unsaved edits.
Features
- Real editor, not a preview — CodeMirror 6 with live headings, lists, tables, inline math, code blocks and Mermaid.
- Selection → chat — a floating Insert into chat button appears beside a selection;
Ctrl/Cmd + Shift + Enterdoes the same. The payload starts with the document's absolute path, then a blank line and the Markdown source (not the rendered text), inserted at the composer caret without stealing focus. - Guarded saves — debounced autosave with version checks;
Ctrl/Cmd + Ssaves immediately with a visible result, whether the caret is in the editor or elsewhere in the panel. An external edit is never overwritten. A dirty buffer is kept in a recovery slot when the tab closes. - Shared notes across windows — the same file can be edited in the MarkPilot desktop app and the DSH sidebar at once. Unsaved changes are exchanged live, each window keeps its own undo history, and a genuine conflict is reported with the draft preserved.
- Save files outside the session workspace — a file opened from the sidebar saves directly to its own folder even when it sits outside the workspace root of the current session; version checks and conflict warnings are unchanged. Files that are read-only or locked at the OS level still report an error.
- Theme-aware — follows the host's light/dark theme, including the first frame.
- Offline assets — KaTeX fonts, the Markdown worker and Mermaid ship with the plugin; no CDN.
- Document reference — type
@mpin the composer to reference the open document. - Local images in the document —
and parent-folder references such asrender in the panel, read through the plugin's own read-only image route; a file that is genuinely missing still shows an explicit placeholder instead of an empty box. - Edit right beside an image — a click in the blank to the right of an image starts editing on the following line (headings, lists and task items keep their markers), instead of opening the image's Markdown source; clicking the image itself still opens its source.
What's new in the 3.6.17 engine
The editor engine is the same accepted build that ships with MarkPilot 3.6.17. Since the 0.3.4 plugin, the right sidebar gained the engine's multi-window work and the save-path fixes that came with it:
- Shared editing across windows — the same note can be open in the desktop app and the DSH sidebar. Unsaved edits are exchanged live, each window undoes only its own typing, and a real conflict is shown with the draft kept instead of overwriting the other window.
- Save while typing — a save in flight is re-synced to the latest text; an external writer is detected and reported; the recovery banner's Keep my changes now actually writes the shared draft; and a cut → undo → redo followed by Ctrl+S no longer fails as an invalid collaborative edit.
- Reverse selections — dragging from a rendered formula across code, images or into the previous paragraph keeps the selection under the pointer, including auto-scroll at the top edge.
- Table and rich-paste editing — cell commands, End/Backspace, escaped pipes, Chinese IME composition, and pasted HTML tables keep captions, source links, inline images and alignment.
- *
…(truncated)
Rendered from the README published on npm. Formatted only, not edited.
Versions
Published on npm::5,最后更新 2026-11-06