https://github.com/frug/js-bbcode-parser
Simple, extendable javascript BBCode parser.
https://github.com/frug/js-bbcode-parser
bbcode javascript regex text
Last synced: 1 day ago
JSON representation
Simple, extendable javascript BBCode parser.
- Host: GitHub
- URL: https://github.com/frug/js-bbcode-parser
- Owner: Frug
- License: mit
- Created: 2014-04-13T03:34:34.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-04-15T21:24:22.000Z (over 11 years ago)
- Last Synced: 2025-03-13T02:21:25.830Z (10 months ago)
- Topics: bbcode, javascript, regex, text
- Language: JavaScript
- Homepage:
- Size: 176 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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](http://blog.stevenlevithan.com/) ( 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.
``
Below that, include the parser itself.
``
Call the parser with the following method
`var output = BBCodeParser.process("Your string");`
Configuration
-------------
License
-------
This project is released under The MIT License (MIT).