RSS Feeds

A Little Introduction into BBcode

BBcode is a gutted version of HTML designed to facilitate some basic formatting and enrichment of your posts on the forum, but without compromising the security and presentation of the bulletin board that full HTML would facilitate. BBCode tags are similar in style to HTML tags, but they are enclosed in square braces [ and ] rather than < and >.

BBcode offers a set of paragraph and text enrichments listed below. The paragraph enrichments are:

Note that

BBcode also provide a set of character enrichments tag to change the format of fonts. These must be pared with the corresponding closing tag.

These token can be nested as required, but not that you must validly nest. So [i][b]Hello[/b][/i] renders as Hello, but [i][b]Hello[/i][/b] has indeterminate results. Also the previous format is stacked when a new tag is parsed and unstacked when the corresponding closing tag is parsed. Hence “This is [size=8]small [color=red]red[/color] text [/size] here” renders as “This is small red text here”.

Finally there are three special tags which map onto HTML anchor and image tags:

Lastly there is an [img] which uses the bare URL reference format. This can be used to insert an image or diagram into your post, but note that the image itself has to be externally hosted on a separate web service. You can also embed image tags in the URL tag name field thus:

Now this is all you need to generate BBcode. Unfortunately I know of no BBcode WYSIWYG editor. At the moment I do my BBcode in OOo Write and post process it with a set of Search/Replace macros. For example: Replace ".*" [regexp;bold] with "[b]" [regular]. I also have on my wish list to promote this to a proper template which handles all of the above rules. My aim here would be to type your post into one frame, using a BBCode specific Formatting Toolbar, with ability to snap the fomatted BBcode into another frame and clipboard for pasting direct into your post.