Skip to content
Back to skills

Online Doc Html

ASecurity

Export Markdown files to paste-friendly standalone HTML for online document editors. Use when the user wants to copy local Markdown content into an online document, reduce manual formatting work, preserve tables/code blocks/headings, convert SVG diagrams to PNG, embed images into HTML, or says "在线文档", "粘贴到在线文档", "Markdown 转 HTML", "图片复制不过去", "导出在线文档 HTML".

  • 12 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added May 27, 2026
data-aibashrailsapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add codingSamss/all-my-ai-needs --skill online-doc-html --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Online Doc Html?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Online Doc Html
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/codingsamss-online-doc-html/badge)](https://www.skillsdirectory.com/skills/codingsamss-online-doc-html)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: online-doc-html
description: Export Markdown files to paste-friendly standalone HTML for online document editors. Use when the user wants to copy local Markdown content into an online document, reduce manual formatting work, preserve tables/code blocks/headings, convert SVG diagrams to PNG, embed images into HTML, or says "在线文档", "粘贴到在线文档", "Markdown 转 HTML", "图片复制不过去", "导出在线文档 HTML".
---

# Online Doc HTML

## Overview

Use this skill to turn local Markdown into standalone HTML that can be opened in a browser, selected, copied, and pasted into online document editors with less formatting cleanup.

The default output is HTML only. Do not generate DOCX unless the user explicitly asks for it.

## Workflow

1. Identify the Markdown files the user wants to sync or copy.
2. Prefer a repo-local export script if one already exists and is clearly maintained for that repo.
3. Otherwise run the bundled script:

```bash
~/.codex/skills/online-doc-html/scripts/export_online_doc_html.sh --out build/online-doc-html <file1.md> <file2.md>
```

4. Open the generated HTML file in a browser, select the article body, copy it, and paste into the online document editor.
5. If images still fail to paste, treat it as an online editor clipboard/upload limitation. The next step is browser automation to insert or upload images, not more HTML tuning.

## Bundled Script

Use `scripts/export_online_doc_html.sh`.

Behavior:

- Converts each Markdown file to standalone HTML via `pandoc`.
- Converts referenced `.svg` images to `.png` with `rsvg-convert` before HTML export.
- Embeds images and CSS into the generated HTML with `pandoc --embed-resources`.
- Writes output to `build/online-doc-html` by default.
- Generates `targets.tsv` with source Markdown and output HTML paths.
- Removes stale DOCX files from the output directory because DOCX is not the default path.

Dependencies:

- Required: `pandoc`.
- Required for SVG diagrams: `rsvg-convert` from `librsvg`.

On macOS:

```bash
brew install pandoc librsvg
```

## Output Guidance

Tell the user:

- Which HTML files were generated.
- Whether SVG references were fully replaced by PNG images.
- Whether any image references could not be resolved.
- That no online document was modified unless browser automation or API update was explicitly requested and confirmed.

## Guardrails

- Do not overwrite or save online documents without explicit user confirmation.
- Do not reverse-engineer private save APIs as the first approach. Prefer paste-friendly HTML first.
- Keep generated artifacts in ignored build/output directories when working inside a repo.

Files in this skill

  • SKILL.md2.6 KB
  • runtime.yaml478 B
  • scripts/export_online_doc_html.sh4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.