@thoughtsunificator/bbcode-parser

1.0.7 • Public • Published

bbcode-parser

bbcode-parser is a JavaScript implementation of the lightweight markup language BBCode.

If you wish to convert BBCode to HTML or HTML to BBCode see bbcode-parser-template.

Getting Started

Installing

  • npm install @thoughtsunificator/bbcode-parser

Usage

import { Parser } from '@thoughtsunificator/bbcode-parser'

const bbDocument = Parser.parse("[b]Hey, thanks![/b]") // return a BBDocument instance

const bbElement bbDocument.documentElement.children[0] // Returns a bbElement
const text = bbDocument.documentElement.children[0].textContent // returns "Hey, thanks!"

API

See https://thoughtsunificator.github.io/bbcode-parser.

Try it out!

See https://codesandbox.io/s/bbcode-parser-gth53.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.7
    20
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.7
    20
  • 1.0.6
    0
  • 1.0.4
    0
  • 1.0.3
    0
  • 1.0.1
    1

Package Sidebar

Install

npm i @thoughtsunificator/bbcode-parser

Weekly Downloads

21

Version

1.0.7

License

MIT

Unpacked Size

1.53 MB

Total Files

94

Last publish

Collaborators

  • thoughtsunificator