Table of Contents
Convert BBCode syntax to HTML.
Something looks broken? We accept bounties to fix them faster.
BBCode is short for Bulletin Board Code. It is used as a way for formatting posts made on message boards, blogs and more. It is similar to HTML in the sense that in BBCode one does also use tags to format something specific (contained within the tag). In BBCode, tags are indicated by rectangular brackets surrounding a keyword, which is in turn transformed into HTML before being delivered to a web browser.
This extension generates semantic HTML markup. Your site will be safe. All HTML code will be encoded in the output, whether it is written outside the code block or inside the code block, without exception.
In your page header, add a
type property with a value set to
title: Page Title description: Page description. author: Taufik Nurrohman type: BBCode ... This is a [b]bold[/b] text :)
Here are the supported syntax. I deliberately did not include the
[size] syntax in this extension because it is too complex and makes the text unpleasant to read.
[b]bold[/b] [i]italic[/i] [s]strike[/s] [u]underline[/u]
Nesting is possible, but it won’t be as accurate as when using native HTML elements. In some cases, your syntax combination might damage each other.
[b][i]bold and italic[/i][/b]
BBCode syntax and smiley patterns written in the code block will not be touched by the parser. Language classes are supported on this extension to be combined with highlight extension and such.
For security reasons, this syntax will only display images when the image URL has an
.webp extension at the end of the name.
Add a number to turn the list into an ordered list. A given number greater than
1 will create a
start attribute with a value of that number added to the generated
<ol> element. Nesting lists is not possible at this time.
[list] * List item 1 * List item 2 * List item 3 [/list] [list=1] * List item 1 * List item 2 * List item 3 [/list] [list=5] * List item 1 * List item 2 * List item 3 [/list]
Several variant syntaxes for lists are available for compatibility reasons.
[list] [*] List item 1 [*] List item 2 [*] List item 3 [/list] [list] [*]List item 1[/*] [*]List item 2[/*] [*]List item 3[/*] [/list]
[quote] Important quote goes here… [/quote]
This extension supports a small set of smiley graphics to enhance the appearance without making them look excessive. No smiley code will be converted into images if it’s written in the HTML tags or in code blocks.
:cool: :grin: :hmm: :lol: :mad: :rolleyes: :sad: :smile: :straight: :tongue: :wink: :yikes:
8) 8-) B) B-) :D :-D :/ :-/ :\ :-\ x( x-( X( X-( :( :-( :'( :'-( :) :-) :| :-| :p :-p :P :-P ;) ;-) :o :-o :O :-O