# @clearfeed-ai/html-to-mrkdwn-ts

> Fast HTML to Slack flavored mrkdwn

Latest version **3.0.1** (published 2026-10-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @clearfeed-ai/html-to-mrkdwn-ts
pnpm add @clearfeed-ai/html-to-mrkdwn-ts
yarn add @clearfeed-ai/html-to-mrkdwn-ts
bun add @clearfeed-ai/html-to-mrkdwn-ts
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2026-10-06 |
| First published | 2024-01-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=14.0.0 |
| Dependencies | 2 |
| Unpacked size | 22.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ClearFeed |
| Maintainers | lalitindoria |
| Keywords | html, markdown, slack, mrkdwn |

## Links

- npm: https://www.npmjs.com/package/@clearfeed-ai/html-to-mrkdwn-ts
- Repository: https://github.com/clearfeed/html-to-mrkdwn-ts
- Homepage: https://github.com/clearfeed/html-to-mrkdwn-ts#readme
- Issues: https://github.com/clearfeed/html-to-mrkdwn-ts/issues
- npm.io page: https://npm.io/package/@clearfeed-ai/html-to-mrkdwn-ts

## Dependencies (2)

- [node-html-parser](https://npm.io/package/node-html-parser.md) ^6.1.1
- [@clearfeed-ai/node-html-markdown](https://npm.io/package/@clearfeed-ai/node-html-markdown.md) ^1.4.4

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 3.0.1 (latest) — 2026-10-06
- 3.0.0 — 2026-09-22
- 2.2.9 — 2026-07-30
- 2.2.7 — 2026-03-10
- 2.2.6 — 2025-09-16
- 2.2.5 — 2025-09-16
- 2.2.4 — 2025-05-20
- 2.2.3 — 2025-03-05
- 2.2.2 — 2024-12-05
- 2.2.1 — 2024-12-04
- 2.2.0 — 2024-12-04
- 2.1.0 — 2024-11-27
- 2.0.2 — 2024-09-10
- 2.0.0 — 2024-01-23
- 1.1.1 — 2024-01-21

## README

[![npm version](https://badge.fury.io/js/html-to-mrkdwn-ts.svg)](https://badge.fury.io/js/html-to-mrkdwn-ts)
![npm downloads](https://img.shields.io/npm/dm/html-to-mrkdwn-ts?style=flat-square)
![Build Status](https://github.com/oferitz/html-to-mrkdwn-ts/workflows/Build%20(CI)/badge.svg)

# html-to-mrkdwn-ts
html-to-mrkdwn-ts is a _fast_ HTML to [Slack flavored markdown](https://api.slack.com/reference/surfaces/formatting) converter.

## Install

```sh
<yarn|npm|pnpm> html-to-mrkdwn-ts
```

## Usage

```ts
import htmlToMrkdwn from 'html-to-mrkdwn-ts'
const html = `
<div>
  <h1>A Title</h1>
  <a href="https://foo.bar">
    <img src="https://foo.bar/baz.jpg" alt="baz" />
  </a>
</div>`

htmlToMrkdwn(html)

// {
//   image: 'https://foo.bar/baz.jpg',
//   text: '*A Title*\n\n<https://foo.bar|baz>'
// }
```

## Options
under the hood html-to-mrkdwn-ts uses [node-html-markdown](https://github.com/crosstype/node-html-markdown/blob/master/README.md) 
so you can pass an additional options as a second argument:
```ts
htmlToMrkdwn(html, { strongDelimiter: '**' })
```


see available [options](https://github.com/crosstype/node-html-markdown/blob/master/README.md#options)

---
_Source: https://npm.io/package/@clearfeed-ai/html-to-mrkdwn-ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
