Skip to content

About

Markdown to X Articles preview and copy tool

Resources

Stars

12 stars

Watchers

0 watching

Forks

Repository files navigation

MD2X — Markdown to X Articles

English | 简体中文

Try it online: markdown2x.com — free, no sign-up, runs in your browser.

A Markdown editor and converter for drafting posts that can be previewed and pasted into X Articles with their formatting intact. Write Markdown, preview as X Articles, copy rich text and image assets, publish.

Features

  • Rich text clipboard: headings, bold, links, lists and inline code survive the paste into X Articles.
  • Code blocks as PNG: 9 syntax-highlighting themes, including GitHub, Dracula, Nord, Night Owl and Tokyo Night.
  • Mermaid and tables as PNG: flowcharts, sequence diagrams and Markdown tables render as styled image assets with theme-synced colours.
  • AI helpers: generate cover images, polish a selection or translate between English and Chinese, and split a draft into a numbered thread.
  • PWA offline: install it as a desktop app; everything except the AI features works offline.
  • Dark mode and two languages: light, dark and system themes, with English and Chinese interfaces.
  • Import, export and autosave: open existing .md files, export drafts, and keep autosaved copies in localStorage so drafts never leave your device.

Quick start

pnpm install
pnpm dev

Open http://localhost:3000.

Copy workflow

  1. Write or paste Markdown and review the live preview.
  2. Choose code block mode — Code Quote (rich text) or Code Image (PNG assets) — and a theme.
  3. Copy Title and paste it into the X Articles title field, then Copy Body and paste it into the editor.
  4. Copy the image assets from the X Assets panel and paste them at the placeholders; attach an AI cover if you want one.

Supported Markdown

Headings h1–h6, paragraphs, ordered and unordered lists, bold, links, inline code, fenced code blocks with language detection, Mermaid diagrams, tables, and X/Twitter status URL embeds.

Development

You need pnpm 10 and Node 22.

pnpm dev          # dev server
pnpm build        # production build
pnpm lint
pnpm typecheck
pnpm test

Next.js 16 (App Router) and TypeScript, Tailwind CSS, the Vercel AI SDK with DeepSeek, OpenAI-compatible image generation, Serwist for the PWA, next-themes, Upstash rate limiting and Vercel Analytics.

License

MIT

About

Markdown to X Articles preview and copy tool

Resources

Stars

12 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages