Godot-docs: BBCode documentation is missing most details

Created on 27 Jun 2016  路  11Comments  路  Source: godotengine/godot-docs

Briefly mentioned on QA.

Currently the BBCode language reference doesn't even contain information about the list of supported tags, a basic syntax example (we can't assume everyone has been using a BBCode-enabled forum all his life, right?), and probably a few helpful tips, if needed.

All 11 comments

Information should maybe be merged to some extent with that of http://docs.godotengine.org/en/latest/contributing/updating_the_class_reference.html#tags-available-for-improved-formatting

But there's nothing about the alignment of the text. In addition:
[Class] [method methodname] [method Class.methodname]
I don't think this applies to RichTextLabel.

Therefore:

  1. There is a full list of BB codes for RichTextLabel;
  2. There are extraneous codes confusing about the possibility RichTextLabel.

Which is why I wrote _to some extent_ :)

i.e., the BBcode reference page should list the common tags, and the page about contributing to the docs should link to the BBcode reference + list the additional tags.

I have some time to spare, so here's the list of bbcodes in RichTextLabel (we will add them in the docs a bit later). Of course, ending tags [/...] exist as well

  • [b] : bold text
  • [i] : italic text
  • [u] : underlined text
  • [indent] : increases indent level
  • [code] : code formatted text
  • [table] [table=] : defines a table. If [table=] is used, defines a table with columns.
  • [cell] [cell=] : defines a cell. If [cell=] is used, the cell merges columns in one.
  • [center] : center aligned
  • [fill] : filled align ?
  • [right] : right aligned
  • [ul] : defines an itemized list
  • [ol] : defines a numbered list
  • [url] [url=] : defines an url. Shows a text replacement if [url=]Replacement text[/url] is used.
  • [img] : image
  • [color=] : use a color for text. Either use html names of colors, or hexadecimal notation.
  • [font=] : use a specific font

Note that current implementation does not allow rowspans (vertical merge of cells).

It turns out he can do more than I expected.

[...] we will add them in the docs a bit later [...]

Was added to the docs page as it seems. Is something still missing here?

I don't see [ul] and [ol], but I don't remember them being supported.

This seems to be the relevant part.

And here we have:

if (tag.begins_with("/") && tag_stack.size()) {
} else if (tag == "b") {
} else if (tag == "i") {
} else if (tag == "code") {
} else if (tag.begins_with("table=")) {
} else if (tag == "cell") {
} else if (tag.begins_with("cell=")) {
} else if (tag == "u") {
} else if (tag == "s") {          //use strikethrough (not supported underline instead)
} else if (tag == "center") {
} else if (tag == "fill") {
} else if (tag == "right") {
} else if (tag == "ul") {         <---
} else if (tag == "ol") {         <---
} else if (tag == "indent") {
} else if (tag == "url") {
} else if (tag.begins_with("url=")) {
} else if (tag == "img") {
} else if (tag.begins_with("color=")) {
} else if (tag.begins_with("font=")) {

Indeed. It seems to have no visual effect in RichTextLabel in the current master branch though (the tags are properly parsed, but it looks like plain text).

@akien-mga Could this issue be added to an existing issue? bbcode issues search displays many issues currently.

Was this page helpful?
0 / 5 - 0 ratings