Skip to content

Markdown Playground

Edit the source on the left and the rendered output updates on the right. Desktop panes use a draggable divider and synchronized scrolling; on narrow screens, use the upper-right icon to switch views. See Use the Markdown package for integration.

Headings and prose

Third-level heading

Fourth-level heading

Fifth-level heading
Sixth-level heading

Inline semantics

Body text supports strong, emphasis, deletion, highlight, inline code, Ctrl + K, H2O, E=mc2, API, citations, short quotes, secondary detail, variables, output, and August 12, 2026.

Statuses use Default, Beta, Released, Review, and Risk.

A normal link and an autolink https://docfuse.dev keep the same visual and keyboard contract.


Lists, tasks, and definitions

  • An unordered item.
    • A nested item preserves structure.
  • Another item.
  1. A first ordered step.
  2. A second ordered step.
  • Semantic HTML is generated.
  • Interaction loads on demand.
  • A host may apply brand tokens.
Default behavior
The compiler generates semantic HTML with keyboard handling, focus states, and ARIA.
Customizable behavior
Colors, typography, spacing, radii, labels, and component replacements.

Quotes and callouts

A documentation UI should clarify content without competing with it.

Context

Use neutral information that does not interrupt the main task.

Recommendation

Offer a concrete action that reduces effort or risk.

Check first

Describe a condition that may make the operation fail.

Irreversible action

Reserve danger for security, data loss, or destructive operations.

Code and terminal

Copy a short command directly: pnpm add @docfuse/markdown.

docfuse.config.ts
export default {  title: 'Docfuse',  search: { enabled: true }}

Highlight selected lines

Fence metadata can combine a filename with one or more highlighted lines:

docfuse.config.ts
export default {  title: 'Docfuse',  i18n: { defaultLocale: 'en', locales: ['en'] },  search: { enabled: true },  theme: { darkMode: true }}

Annotate line states

Line markers demonstrate highlight, diff, focus, word, error, and warning states without changing the block anatomy:

ts
const oldName = 'docs'const newName = 'docfuse'const searchable = trueconst result = buildSite(config)const output = resolveOutput(config)throw new Error('Invalid config')console.warn('Missing description')

Multiple languages

Built-in languages reuse the same file bar, line numbers, copy feedback, light/dark theme, and wrapping:

bash
pnpm docs:buildpnpm docs:preview
json
{  "title": "Docfuse",  "search": { "enabled": true }}

Project files and source

The code-block title selects the filename and file icon; the fence language selects highlighting.

package.json
{ "scripts": { "docs:dev": "docfuse dev" } }
SearchPanel.tsx
export function SearchPanel() {  return <button type="button">Search</button>}
.env.example
DOCFUSE_ORIGIN=https://docs.example.com

Long lines wrap inside the code block instead of widening the content canvas:

long-line.ts
const summary = 'Docfuse keeps Markdown, MDX, React components, search, localization, versioning, static output, and machine-readable artifacts in one build workflow.'

Code Group

pnpm
pnpm add @docfuse/markdown

Terminal

Terminal
$ pnpm docs:build
 Built 42 pages in 1.8s

Failure output keeps the command, source location, and exit state together:

Build failed
$ pnpm exec docfuse check
✗ docs/guide/setup.md: broken internal link /guide/install/
Command failed with exit code 1

Tables and data

table
HeadingStable hierarchy and anchorCopy section link
Code blockShiki highlight and labelCopy source
TableSemantic header and rowsSort, copy/download CSV, enlarge
DiagramPreview and sourceCopy, switch, zoom
ImageResponsive media frameOpen large preview

Use the table header to test sorting and the toolbar to test CSV and preview behavior.

Extended content components

Tabs

Use the default theme and component map.

Steps

  1. Prepare content

    Write Markdown, complete frontmatter, and verify local asset paths.

  2. Verify

    Run content checks and a clean production build.

  3. Publish

    Upload the generated static directory.

Card Grid

With linkCard() enabled, a standalone HTTP(S) link becomes a link card:

Docfuse on GitHubgithub.com/jiangxinlei/docfuse

File Tree

      • playground.md
      • usage.md
      • playground.md
      • usage.md
    • logo.svg
  • docfuse.config.ts
  • package.json

API block and aside

GET/api/docs/:slug
table
slugstringyesDocument route identifier
localestringnoFalls back to the site's default locale
draftbooleannoAllows draft content when explicitly enabled
200

{ "title": "Markdown" }

404

{ "error": "Not found" }

Files, images, and trusted media

PDF, Word, PowerPoint, and Excel

Standalone links with supported document extensions become file blocks. The URLs below only demonstrate the file-block appearance; replace them with real file URLs in your site:

docfuse-api.pdfPDF document · PDF release-checklist.docxMicrosoft Word · DOCX product-demo.pptxMicrosoft PowerPoint · PPTX compatibility.xlsxMicrosoft Excel · XLSX

Images and captions

Open the image preview

Video, audio, and embeds

These directives generate native media elements and apply accessible labels, loading defaults, and iframe permission boundaries.

Put media files in docs/public/ and reference them with site-absolute paths.

Diagrams and math

Enable Mermaid, PlantUML, Kroki, and math through official plugins. Each diagram supports source copy, source/preview switching, inline zoom, and an expanded view.

diagram.mmd
Diagram preview loads in the browser.
diagram.puml
PlantUML diagram
diagram.graphviz
Kroki diagram
diagram.d2
Kroki diagram

Inline math E=mc2E = mc^2 follows prose. Display math owns its overflow boundary:

01x2dx=13\int_{0}^{1} x^2 \, dx = \frac{1}{3}

Details and footnotes

Expanded details

Native disclosure keeps keyboard and focus behavior without a mandatory rich runtime.

When should content be collapsed?

Use a disclosure for optional steps, long logs, or compatibility notes. Keep information required for the current task in the main flow.

Footnotes add a source or short explanation without interrupting the main flow.1

Use Package usage for integration and the React API for exact contracts.

Footnotes

  1. Follow the footnote number to the note, then use the return link to continue reading.