All the Tags
Header
Bold, Italic, Underline, Strikethough, Inline Code, Olive Color, 120% of normal text size.- Numbers
- Lowercase
- Uppercase
- Lowercase Roman Numerals
- Uppercase Roman Numerals
- Bulleted list
- Nested list
- Doubly nested list
- Nested list
Code: Select all
// This is the PHP syntax highlighter. Use `[code=php]<Your code here>
$description = "This is some example PHP (I really don't know how it works, so I'm guessing).";
if (1 === 1) {
echo "Some text";
} else {
echo "Never text";
}[/code]
Code: Select all
Code with no syntax highlighting.
Anonymous quote
Wikipedia wrote:Cheese is a dairy product derived from milk that is produced in a wide range of flavors, textures, and forms by coagulation of the milk protein casein.
Spoiler
Plain spoiler
Spoiler
Titled spoiler
Automatic URL (Can be disabled with Do not automatically parse URLs in the Options posting section): https://wiki.minetest.net
Forum Automatic URL: index.php
URL: http://www.wikipedia.org
Named URL: Minetest Github
Email: celeron55@gmail.com
And here's the source for all these (hopefully some people will find these useful; I had to figure them all out myself):
Code: Select all
[h]Header[/h]
[b]Bold[/b], [i]Italic[/i], [u]Underline[/u], [s]Strikethough[/s], [icode]Inline Code[/icode], [color=olive]Olive Color[/color], [size=120]120% of normal text size[/size].
[list=1][*]Numbers[/list]
[list=a][*]Lowercase[/list]
[list=A][*]Uppercase[/list]
[list=i][*]Lowercase Roman Numerals[/list]
[list=I][*]Uppercase Roman Numerals[/list]
[list][*]Bulleted list[list][*]Nested list[list][*]Doubly nested list[/list][/list][/list]
[code=php]// This is the PHP syntax highlighter. Use `[code=php]<Your code here>
$description = "This is some example PHP (I really don't know how it works, so I'm guessing).";
if (1 === 1) {
echo "Some text";
} else {
echo "Never text";
}[/code]
Code: Select all
Code with no syntax highlighting.
Anonymous quote
Wikipedia wrote:Cheese is a dairy product derived from milk that is produced in a wide range of flavors, textures, and forms by coagulation of the milk protein casein.
Spoiler
Plain spoiler
Spoiler
Titled spoiler
Automatic URL (Can be disabled with Do not automatically parse URLs in the Options posting section): https://wiki.minetest.net
Forum Automatic URL: index.php
URL: http://www.wikipedia.org
Named URL: Minetest Github
Email: celeron55@gmail.com[/code]
Hopefully I didn't forget any tags.
Problems
Some random problems with the current BBCode:- will render styles inside of it, so trying to display [b][/b] requires a non-printable character inside the [b] tag, which is annoying and hard to figure out.
- Solution: don't render tags inside and make sure that every inside another has a corresponding [/icode].
- The
Spoiler
tag requires JavaScript, or so I've heard.- Solution: use the <details> and <summary> HTML tags instead. This is not supported in Edge/IE, so some JavaScript would still be necessary to support those browsers, but not the wide variety that JavaScript dislikers use (i.e. Wuzzy, who probably doesn't use Edge/IE anyway)
[*]Not all the tags are shown in the top bar of styling options. Things like spoilers, strikethrough, and headers should be there as well.- Solution: Put them there. Also, while we're at it, place code and icode next to each other so they are more logically grouped.
- Also note: The Minetest BBCode Guide doesn't document all the tags, so they should be added.
- Solution: Add some more useful ones, specifically Lua and possibly C++.
Suggested Tags
The current BBCode tags are nice, but a few others would be quite useful as well:- Superscripts and subscripts: Simply [sup] and [sub] implemented as their HTML counterparts.
- Tables: An example is better than anything else here:
Code: Select all
[table] [row] [**]First Name: [**]Last Name: [**]Favourite Food: [row] [*]George [*]Washington [*]Grapes [row] [*=2x1]NoLastName [*]Pizza [/table]
- I suggest that the main tag is [table], with the [row] tag for the rows (<tr> HTML tag), the [**] tag for column tops (<th> HTML tag), and the [*] tag, which is also used in [list] (<td> HTML tag). None of the inner tags require a closing tag, since that would be redundant.
- The [*] and [**] tags have an optional argument of [*=<rowpan>x<colspan>]. Most markup languages, including Markdown, don't have this feature, and it can be quite annoying to not have.
- Tables would have been useful in this post at the top where the tags were being displayed. In one column, I could show examples, and in the other, I could show the necessary code, instead of displaying all the code at the bottom, which is harder to read.
- In the BBCode Problems section above, I used nested lists to show a problem and a corresponding solution. A better tag set for this would be the <dl>, <dt>, and <dd> HTML tags. My proposal for the BBCode implementation would be
Code: Select all
[list=def] [*]Infinite Loop [**]See "Loop, Infinite" [*]Loop, Infinite [**]See "Infinite Loop [/list]