# html-slack

> An html to slack conversion utility that supports a wide array of html tags, converting them to slack suitable markdown

Latest version **1.1.1** (published 2018-03-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install html-slack
pnpm add html-slack
yarn add html-slack
bun add html-slack
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-03-14 |
| First published | 2018-03-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 240.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Olatunji Ayodabo |
| Maintainers | godolatunji |
| Keywords | convert, slack, html, markdown |

## Links

- npm: https://www.npmjs.com/package/html-slack
- Repository: https://github.com/godolatunji/html-slack
- Homepage: https://github.com/godolatunji/html-slack#readme
- Issues: https://github.com/godolatunji/html-slack/issues
- npm.io page: https://npm.io/package/html-slack

## Dependencies (1)

- [turndown](https://npm.io/package/turndown.md) ^4.0.1

## 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

- 1.1.1 (latest) — 2018-03-14
- 1.1.0 — 2018-03-12
- 1.0.0 — 2018-03-11

## README

# html-slack
This package converts html to slack markdown with support for more html tags and conforming them to slack standard markdown.

#How to use
```js
    const h2s = require("html-slack");

    //  a header tag
    //  ============
    console.log(h2s("<h1>a header tag"));

    //  *a strong text*
    console.log(h2s("<strong>a strong text</strong>"))
```

# html tags support
The following tags are supported
1. All header tags - they are underlined on conversion
2. div and p tags 
3. del, s  and strike tags - converted using ~text~ format
4. mark and q tags - converted using \`text\` format
5. the i and em tags - converted using \_text\_ format
6. the blockquote and pre tags.
7. the ol and ul tags
8. u tag

# To-do
- conversion of table

# Extra
The converter also takes care of element with `text-decoration` style attribute.
For example:
```js
//  ~this is a deleted text~
    console.log(h2s('<span style="text-decoration: line-through">this is a deleted text</span>'));

// `_this is an underlined text_`
    console.log(h2s('<span style="text-decoration: underline">this is a underlined text</span>'));
```

---
_Source: https://npm.io/package/html-slack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
