chendefine/dsh-sidebar-superdoc-docx0

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.

AI 分析

核心用于在侧边栏中直接编辑 DOCX 文档。适合需要轻量级、免服务器部署的本地文档编辑用户,必要条件是需安装 dsh-better-sidebar 插件。

パッケージ
dsh-sidebar-superdoc-docx
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/09/01

インストール

$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

Vieweridpriority
built-in code viewercode-100
built-in download viewerbinary-download-50
office preview plugindocx0
OnlyOffice pluginonlyoffice:docx10
this pluginsuperdoc:docx10

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.