0.3.8 • Published 3 years ago

@thoughtsunificator/bbcodeparser v0.3.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

bbcodeparser Build Status

bbcodeparser is a JavaScript implementation of the lightweight markup language BBCode.

bbcodeparser is not an HTML Parser. If you wish to convert BBCode to HTML or HTML to BBCode use https://github.com/thoughtsunificator/bbcodeparser-template-example on top of bbcodeparser.

Getting Started

Installing

Browser

Run git submodule add https://github.com/thoughtsunificator/bbcodeparser lib/bbcodeparser at the root of your project.

Node.js

  • npm install @thoughtsunificator/bbcodeparser
  • Add type: "module" to your package.json.

Usage

import { Parser } from '@thoughtsunificator/bbcodeparser' // or ./lib/bbcodeparser/index.js

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].innerText // returns "Hey, thanks!"

API

You can read the API by visiting https://thoughtsunificator.github.io/bbcodeparser.

Try it out!

You can play with bbcodeparser by visiting https://codesandbox.io/s/bbcodeparser-gth53

0.3.8

3 years ago

0.3.7

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.2

4 years ago

0.3.3

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.8

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago