Extendible BBCode Previewer (JavaScript)

You can download the JavaScript module for this here.

Input Text:

Remove misaligned tags
Add in line break tags where line breaks exist

Test Cases:

Errors: False

Formatting:

  • [b]bold text[/b]
  • [code]monospaced text[/code]
  • [color=red]red text[/color]
    [color=#ff0000]red text[/color]
  • [i]italicized text[/i]
  • [list][*]1[*]2[/list]
  • [img]image url[/img]
  • [noparse][b]bbcode[/b][/noparse]
  • [quote]quoted text[/quote]
  • [s]strikethrough text[/s]
  • [size=30]sized text[/size]
  • [table][tr][td]cell[/td][/tr][/table]
  • [u]underlined text[/u]
  • [url]http://example.com/[/url]
    [url=http://example.com/]text[/url]
Output:

patorjk.com