DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-markdown-export

Z

dsh-markdown-export

Discovered

为dsh客户端markdown预览界面加入了导出为HTML/PDF的功能

Machine translated

Markdown Export

中文文档 · English

A DeepSeek Harness plugin that adds Export to the Markdown document preview. Turn the Markdown file you have open into a self-contained HTML file, or a PDF, without leaving the app.

Features

  • Export → HTML document — downloads a single .html file with inline styles and local images embedded as data URIs. The file works offline and can be sent to anyone.
  • Export → PDF document — renders the same document in a hidden print frame and opens the system print dialog; choose a PDF printer or "Save as PDF".
  • Markdown only — the button appears only for .md / .markdown files in the document preview toolbar.
  • Reads what the preview reads — the source is read through the Harness workspaceFiles Remote, so the export always reflects the current file on the Host.
  • Localized — Chinese and English UI text follow the app locale.

Supported Markdown

GroupSyntax
HeadingsATX (#) and Setext (=== / ---), auto-generated anchor ids
Emphasis**bold**, *italic*, ***both***, ~~strikethrough~~, \inline code``
BlocksParagraphs, hard line breaks, horizontal rules, blockquotes (nested)
ListsOrdered / unordered, nested, task lists (- [x]), loose and tight lists
CodeFenced blocks with language label, indented code blocks
TablesGFM tables with :---, :---:, ---: alignment
Links & images[text](https://github.com/ZhaoChongyan/dsh-markdown-export/blob/HEAD/url), <https://…>, ![alt](https://raw.githubusercontent.com/ZhaoChongyan/dsh-markdown-export/HEAD/path), titles
Footnotes[^id] references and [^id]: definition
OtherYAML front matter (used for the title only, stripped from output)

Raw HTML is escaped rather than rendered, and javascript: / vbscript: URLs are dropped, so an exported file is safe to share.

How it works

  1. client.js registers a list entry in the sidebar.right.tab.document.actions slot of the built-in document preview.
  2. On click, the Markdown file is read with ctx.remote.workspaceFiles.readBytes(...).
  3. The built-in renderer parses the Markdown into HTML, applies the export stylesheet, resolves relative image paths against the file's directory, and embeds up to 16 local images (bounded at 10 MiB total).
  4. HTML: a Blob URL is created and downloaded as <file-name>.html.
  5. PDF: the same HTML is loaded into a hidden iframe and print() is called; the print stylesheet handles page margins and break-inside: avoid for code blocks, tables, and images.

The Host half (index.js) is empty — everything happens in the browser.

Installation

Install the bundle as a local package in the current profile:

  1. Open the DeepSeek Harness Web UI.
  2. Install this directory as a bundle, e.g. with the plugin manager's install_bundle action and the absolute path to this folder.
  3. The change applies immediately; refresh the page if it was already open.

The package declares dsh.bundle.patch (cordis.patch.yml, which inserts the markdown-export row) and a dsh.client section with the required client packages. No dependencies or build step are needed.

Usage

  1. Open a .md file from the workspace file tree so it shows in the right-hand preview.
  2. Click Export in the preview's toolbar (next to the reload button).
  3. Choose a format:
    • HTML document — the file is downloaded straight away.
    • PDF document — pick a PDF printer or "Save as PDF" in the dialog that opens.

Project structure

markdown-export/
├── package.json          # bundle manifest (dsh.bundle + dsh.client)
├── cordis.patch.yml      # inserts the plugin row
├── index.js              # Host half (no-op)
├── client.js             # Markdown renderer + toolbar action
├── icon.svg              # plugin icon
└── locale/
    ├── en.json           # English display metadata
    └── zh.json           # Chinese display metadata

Limitations

  • PDF output uses the browser's print pipeline, so the file is produced by the print dialog rather than downloaded directly.
  • Only the part of the document the preview has loaded is available: the export reads the file through the documented workspace API, so very large files are subject to its read limits.
  • Local images are embedded from disk; remote http(s) images stay as links and need network access when the HTML is opened.
  • Syntax highlighting is limited to the language label above a fenced code block.

License

MIT

Comments

Loading…

Similar plugins

dsh-plugin-md-preview

by anitman

DSH Markdown 预览器 / DSH Markdown Previewer — web GUI 侧栏 Markdown 浏览、渲染与编辑保存(原子写入 + mtime 冲突检测)

Manifest valid

★ 0

JavaScript

Aug 16, 2026

dsh plugin --profile web add dsh-plugin-md-preview

by 2017java

DSH web 插件:在 dsh-better-sidebar 侧边栏内把 Markdown 富渲染为预览(代码高亮 / 目录 / 一键复制)。

Terminal & ClientsManifest valid

★ 0

MIT

JavaScript

Aug 25, 2026

dsh plugin --profile web add dsh-md-viewer

by DDDMUC

DSH 会话可读导出:把 DeepSeek Harness 会话导出成可读的 Markdown / HTML / 纯文本 / ZIP 文字稿(思考块、工具调用与结果、代码块、图片、时间戳、标题与用量)

Development & InfrastructureTerminal & ClientsManifest valid

★ 7

↓ 15/wk

MIT

JavaScript

Oct 15, 2026

dsh plugin --profile web add dsh-chat-export

by long6177

a dsh‑plugin for enhancing users' Markdown input experience | 一个 用于增强用户 markdown 输入体验的 dsh-plugin

Tools & CapabilitiesUI & ExperienceManifest valid

★ 0

MIT

TypeScript

Oct 7, 2026

dsh plugin --profile web add dsh-markdown-input

by omdsh-dev

DSH Markdown 工具插件:HTML↔Markdown 转换、GFM 表格规范化、目录生成,零依赖轻量解析器,注册 markdown 工具

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 4

MIT

TypeScript

Sep 10, 2026

dsh plugin --profile web add @deepseek-ai/dsh-tool-markdown

by Lukeknow0

Preview DSH Markdown output links inside Better Sidebar instead of an external app.

Manifest valid

★ 0

MIT

JavaScript

Sep 20, 2026

dsh plugin --profile web add dsh-markdown-link-preview