Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eesast/md2wx

Convert Markdown to WeChat compatible HTML, rendered in GitHub flavor
https://github.com/eesast/md2wx

github katex latex markdown wechat

Last synced: 21 days ago
JSON representation

Convert Markdown to WeChat compatible HTML, rendered in GitHub flavor

Awesome Lists containing this project

README

        

# md2wx

Convert Markdown to WeChat compatible HTML, rendered in GitHub flavor

## Features

- Convert Markdown to GitHub flavored HTML
- Code highlighting
- Support LaTeX via KaTeX
- Convert LaTeX SVG to WeChat compatible PNG (copy & paste enabled!)

## Installation

```shell
npm install md2wx

# or
yarn add md2wx
```

## Usage

```js
import md2wx from "md2wx";
```

### `renderHtml`

```js
const text = "## h2";
const highlight = true;
const html = md2wx.renderHtml(text, highlight);
```

### `convertSvgToPng`

```js
await md2wx.convertSvgToPng();
```