Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

thoughtsunificator/bbcode-parser

Repository files navigation

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 http://bbcode-parser.unificator.me.

Try it out!

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

About

Tiny BBCode JavaScript implementation

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /