# react-markings

> Markdown in components, components in markdown

Latest version **1.3.0** (published 2018-04-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-markings
pnpm add react-markings
yarn add react-markings
bun add react-markings
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2018-04-26 |
| First published | 2017-08-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/react-markings) |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 880 |
| Author | James Kyle |
| Maintainers | thejameskyle |

## Links

- npm: https://www.npmjs.com/package/react-markings
- Repository: https://github.com/Thinkmill/react-markings
- Homepage: https://github.com/Thinkmill/react-markings#readme
- Issues: https://github.com/Thinkmill/react-markings/issues
- npm.io page: https://npm.io/package/react-markings

## Dependencies (2)

- [commonmark](https://npm.io/package/commonmark.md) ^0.27.0
- [commonmark-react-renderer](https://npm.io/package/commonmark-react-renderer.md) ^4.3.3

## Recent versions

- 1.3.0 (latest) — 2018-04-26
- 1.2.0 — 2018-02-27
- 1.1.7 — 2017-11-23
- 1.1.6 — 2017-10-09
- 1.1.5 — 2017-10-09
- 1.1.4 — 2017-09-08
- 1.1.3 — 2017-09-07
- 1.1.2 — 2017-08-31
- 1.1.1 — 2017-08-30
- 1.1.0 — 2017-08-23
- 1.0.1 — 2017-08-23
- 1.0.0 — 2017-08-22

## README

# react-markings

> Markdown in components, components in markdown

- Allows you to write markdown using [commonmark.js](https://github.com/commonmark/commonmark.js)
- Renders markdown as React elements using [commonmark-react-renderer](https://github.com/rexxars/commonmark-react-renderer)
- Embed React components inside your markdown (in any paragraph position) like this:

```js
import * as React from 'react';
import md from 'react-markings';

function Example() {
  return (
    <pre>
      <code>...</code>
    </pre>
  );
}

export default function ReadMe() {
  return md`
    # react-markings

    > Markdown in components, components in markdown

    - Allows you to write markdown using [commonmark.js](https://github.com/commonmark/commonmark.js)
    - Renders markdown as React elements using [commonmark-react-renderer](https://github.com/rexxars/commonmark-react-renderer)
    - Embed React components inside your markdown (in any paragraph position) like this:

    ${<Example/>}
  `;
}
```

If you want to customize rendering further, you can use `customize` to pass your
own [renderers](https://github.com/rexxars/commonmark-react-renderer#type-renderer-options).

```js
import * as React from 'react';
import md from 'react-markings';

let customMd = md.customize({
  renderers: {
    // customize heading with class
    heading: props => React.createElement('h' + props.level, { className: 'fancy-heading' }, props.children),
  },
});

export default function CustomHeading() {
  return customMd`
    # Fancy Heading
  `;
}
```

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