Skip to content

Frug/js-bbcode-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript BBCode Parser

This is a simple JavaScript BBCode parser module that returns html when fed BBCodes.

It's designed to be light-weight and allows you to easily add your own BBCodes with only basic JavaScript knowledge.

It was based initially on the Extendible BBCode Parser by Patrick Gillespie ( github @patorjk )

with help from the regexp blogs of Steven Levithan ( github @slevithan )

Usage

Include your configuration file, which defines all the BBCodes you want to support, and all the valid color codes. You can do this in your document head or at the bottom of your page.

<script src="bbcode-config.js"></script>

Below that, include the parser itself.

<script src="bbcode-parser.js"></script>

Call the parser with the following method

var output = BBCodeParser.process("Your string");

Configuration

License

This project is released under The MIT License (MIT).

About

Simple, extendable javascript BBCode parser.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published