https://github.com/arcticwarmth/html2mrkdwn
Convert HTML code to mrkdwn for Slack messages
https://github.com/arcticwarmth/html2mrkdwn
html mrkdwn nodejs slack
Last synced: 4 months ago
JSON representation
Convert HTML code to mrkdwn for Slack messages
- Host: GitHub
- URL: https://github.com/arcticwarmth/html2mrkdwn
- Owner: ArcticWarmth
- License: mit
- Created: 2023-11-27T17:44:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-02-06T00:27:24.000Z (5 months ago)
- Last Synced: 2026-02-06T10:27:42.854Z (5 months ago)
- Topics: html, mrkdwn, nodejs, slack
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/html2mrkdwn
- Size: 102 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# HTML2MRKDWN
Quick parsing of HTML to [slack's mrkdwn](https://api.slack.com/reference/surfaces/formatting) for use with their API
## Installing
To install with NPM run
> `npm install html2mrkdwn`
## Usage
The parser is contained within the static `convert()` method. Two examples are showen below with both usage in es5 and CommonJS.
### Examples
es5
```js
import {html2mrkdwn} from 'html2mrkdwn';
console.log(html2mrkdwn.convert('
Hello World
'));
```
CommonJS
```js
const convert = require('html2mrkdwn');
console.log(convert.html2mrkdwn.convert('
Hello World
'));
```
## Quick Links
> [Contributing]()