Skip to content

JimLiu/bbcode-to-react

Repository files navigation

bbcode-to-react

A utility for turning raw BBCode into React elements.

Installation

Install bbcode-to-react and peer dependencies via NPM

npm install --save bbcode-to-react react

Import bbcode-to-react, example:

import React from 'react'; import parser from 'bbcode-to-react'; const Example = (props) => { return ( <p>{parser.toReact('[b]strong[/b]')}</p> ); }

Development

Install dependencies:

npm install

Run examples at http://localhost:8080/ with webpack dev server:

npm start

Run tests & coverage report:

npm test

Watch tests:

npm run test-watch

About

A utility for turning raw BBCode into React elements.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •