I've tried to create a new BBcode to allow inserting tables into posts. Using a table would be appropriate when you need to format information into columns and rows. In the past, I had created the column BBcodes-- [col] and [cols]-- but I'm not happy with how they work. Being able to actually create tables will be much more powerful.
This is a test of the [table] BBcode. You are welcome to test it as well, but you might not want to use it too many places just yet, since I'm still working on it, and it might change based on your suggestions and feedback. Let me know if it doesn't work or if you have an idea to improve it.
To get this: | Type this: |
Item | Quantity | Cost |
Pizza | 3 | $45 |
Shirt | 1 | $20 |
Car | 1 | $15,000 |
Water | 12 | $12 |
| [table]
{||}Item|Quantity|Cost
{|}Pizza|3|$45
{|}Shirt|1|$20
{|}Car|1|$15,000
{|}Water|12|$12
[/table] |
Suject | Verb | Prepositional phrase |
Jenny | wants | to go to college. |
| [TABLE]
{|}[I]Suject[/I]|[I]Verb[/I]|[I]Prepositional phrase[/I]
{|}Jenny|wants|to go to college.
[/TABLE] |
Letters | Numbers |
a | 1 |
b | 2 |
c | 3 |
| [table=noborder]
{||}Letters|Numbers
{|}a|1
{|}b|2
{|}c|3
[/table] |
Usage:
- Put the table inside the [table][/table] tags.
- Each new row must start with this: {|}.
- If you want to emphasize a row as a header or footer, start that row with this: {||}
- Separate each column with a pipe character |.
- You can use [table=noborder] to remove the border.
- You can use other formatting inside the table (bold, italics, etc.) but they have to be used within each column only, otherwise it will break things. (In other words, don't apply any formatting to the pipe characters themselves.)
- That's pretty much it.