chendefine/dsh-sidebar-superdoc-docx ↗★ 0
dsh-sidebar-superdoc-docx
DSH web plugin: open and edit .docx files in the better-sidebar editor through SuperDoc (superdoc.dev) — a browser-native DOCX editor. Assets are self-hosted from this package's node_modules; edited documents export back to disk atomically.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:chendefine/dsh-sidebar-superdoc-docx说明文档
阅读完整 README ↗Usage
Opening a document
Click any .docx in the sidebar file tree — it opens in the DOCX (SuperDoc) viewer instead of the built-in
code/download viewers.
Switching the open mode
Under Settings → Side cards → File preview → DOCX (SuperDoc), the gear exposes the "open mode" select:
editing / suggesting / viewing. The choice persists in pluginSettings['superdoc:docx'].mode and takes effect
immediately (the editor remounts in the new mode); viewing also hides the save button.
Editing & saving
- The top toolbar is SuperDoc's native one (bold, lists, comments, …) and folds automatically as the pane narrows;
- after edits, the header shows
● Unsaved changes; click Save to export and atomically write back to the opened path; - state machine: Saving… → Saved / Save failed (failures carry a reason and can be retried); edits made while a save is in flight keep the unsaved hint so you can re-save.
Following outside edits (e.g. an AI agent edited the file)
- clean editor: the 3s poll detects the disk change → re-fetches and swaps in place via
replaceFile, re-fitting the zoom; - dirty editor: only a "File changed on disk" banner appears — you decide whether to
Reload(reloading discards the current unsaved edits).
Coexistence with other viewers
| Viewer | id | priority |
|---|---|---|
| built-in code viewer | code | -100 |
| built-in download viewer | binary-download | -50 |
| office preview plugin | docx | 0 |
| OnlyOffice plugin | onlyoffice:docx | 10 |
| this plugin | superdoc:docx | 10 |
Ties (e.g. with OnlyOffice) break by registration order. Every viewer can be toggled individually under Settings → Side cards → File preview without affecting the others.