# contentful-html-to-richtext

> A simple package to convert from HTML to Contentful Rich Text

Latest version **0.1.4** (published 2019-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install contentful-html-to-richtext
pnpm add contentful-html-to-richtext
yarn add contentful-html-to-richtext
bun add contentful-html-to-richtext
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2019-06-27 |
| First published | 2019-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 45 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Alturos Destinations GmbH |
| Maintainers | benedikt-a |
| Keywords | contentful, html, parser, cheerio |

## Links

- npm: https://www.npmjs.com/package/contentful-html-to-richtext
- Repository: https://github.com/AlturosDestinations/Alturos.ContentfulHtmlToRichtext
- Homepage: https://github.com/AlturosDestinations/Alturos.ContentfulHtmlToRichtext#readme
- Issues: https://github.com/AlturosDestinations/Alturos.ContentfulHtmlToRichtext/issues
- npm.io page: https://npm.io/package/contentful-html-to-richtext

## Dependencies (2)

- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.3
- [@types/cheerio](https://npm.io/package/@types/cheerio.md) ^0.22.11

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

- 0.1.4 (latest) — 2019-06-27
- 0.1.3 — 2019-06-27
- 0.1.2 — 2019-06-27
- 0.1.1 — 2019-06-27

## README

# HTML to Contentful RichText

## Installation

```
npm i contentful-html-to-richtext -s
```
## Usage

This package exposes one simple method called `generateRichText`:

```javascipt
var parser = require("../");

let rt = parser.generateRichText(
  `<a href='mailto:test'>We link!</a>
  <p>this a test is <a href='mailto:test'>inmtext</a> test <b>Can we do it nested?</b> </p> <h1>BIG GUY</h1>but can we do more?`
);
console.log(JSON.stringify(rt, null, 2));
```

This should produce (if published to Contentful with `contentful-management`):
![alt text](/images/sample_output.png "sample")

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