# draft-js-bbcode-converter

> DraftJS: Convert to and from BBCode

Latest version **0.1.8** (published 2016-05-31) · 0 weekly downloads

## Install

```sh
npm install draft-js-bbcode-converter
pnpm add draft-js-bbcode-converter
yarn add draft-js-bbcode-converter
bun add draft-js-bbcode-converter
```

## 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.8 |
| Published | 2016-05-31 |
| First published | 2016-05-23 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | fv@hubrick.com |
| Maintainers | defreek |
| Keywords | draft-js, convert, bbcode |

## Links

- npm: https://www.npmjs.com/package/draft-js-bbcode-converter
- Repository: https://github.com/hubrick/draft-js-bbcode-converter
- Homepage: https://github.com/hubrick/draft-js-bbcode-converter#readme
- Issues: https://github.com/hubrick/draft-js-bbcode-converter/issues
- npm.io page: https://npm.io/package/draft-js-bbcode-converter

## Dependencies (3)

- [bbcode-parser](https://npm.io/package/bbcode-parser.md) ^1.0.10
- [synthetic-dom](https://npm.io/package/synthetic-dom.md) ^0.1.4
- [draft-js-utils](https://npm.io/package/draft-js-utils.md) ^0.1.5

## Recent versions

- 0.1.8 (latest) — 2016-05-31
- 0.1.7 — 2016-05-24
- 0.1.6 — 2016-05-24
- 0.1.5 — 2016-05-24
- 0.1.4 — 2016-05-23
- 0.1.3 — 2016-05-23
- 0.1.2 — 2016-05-23
- 0.1.1 — 2016-05-23
- 0.1.0 — 2016-05-23

## README

# DraftJS: Convert to and from BBCode

This is a module for [DraftJS](https://github.com/facebook/draft-js) that will convert BBCode to editor content and back.

Based on [draft-js-import-element](https://github.com/sstur/draft-js-import-element) and [draft-js-export-html](https://github.com/sstur/draft-js-export-html)

## How to use


```
import converter from 'draft-js-bbcode-converter';

// import from bbcode
const contentState = converter.bbcodeImport('[p]Hello [b]world[/b][/p]')

// export to bbcode
const contentState = editorState.getCurrentContent();
const bbcodeString = converter.bbcodeExport(contentState);

```

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