World Anvil has three different systems to generate tables, each with its upsides and downsides. BBCode tables are flexible but difficult to use, while block tables are easy to use but have less flexibility. You can learn more about these types of table in the
Guide to BBCode Commands and the
Guide to Blocks respectively.
This guide deals with interactive tables, which are easy to use and let you display information which the reader can interact with.
Creating a Table
You can access the Tables feature from the left sidebar. Click it to access the list of Tables (which should be empty if you are following this guide for the first time). Click the "Create a new table" button in the right sidebar and fill in the form with some basic details:
- Title: this is the header that will be displayed on top of the table.
- Description: an explanation of what the table is or represents.
- Status: you may pick if you want the table to be public or private.
- Subscribers: if the table is private, choose the subscriber groups that can see this table. More information in the Guide to Subscribers.
Confirm the creation of the table and you will be taken in the page to edit the table's contents.
Copy Table
You can also copy the column structure of another table. From the
Advanced tab, find the
Copy Table field in the
Caution section. Pick the interactive table you want to copy and its structure will be copied into the current one. Keep in mind that this will the delete the current data, and it can't be undone!
Importing Tables
If you already have a table in CSV format, you can import it directly to this system. Go to the
Advanced tab and click the
Import from CSV button in the
Caution section. Make sure you follow the instructions you'll find in the modal window that will pop up to avoid data loss!
Editing a table
The interface to edit the table looks like this:
The
Architecture tab at the top has all the tools to edit how the table looks, while the
Settings has all the fields you filled in during creation. So, let's focus on the
Architecture tab.
It's very important to note that changes to a table are
not auto-saved. Always use the
Save button before leaving or reloading the page. Next to the
Save button, the
Embed button will copy a BBCode tag in your clipboard that you can paste anywhere on World Anvil. The
Test Roll button will randomly select a row of your table if you have a Roll column (see below).
Adding information to the table
There are two
plus buttons, one at the bottom to add rows and one at the right to add columns. When you add a new column, this modal window will appear:
You can type in the column header and pick the type of column you want it to be. Keep in mind that you can't change the column type after its creation.
Column Types
- Text: the default, for simple text.
- Checklist: adds a checkbox button to all rows.
- Image: for images you have uploaded to your world.
- Article: for articles that you have created in your world.
- Link/URL: for full URLs, both to internal and external World Anvil pages.
- Roll: choose this option if you want to create a rollable table (useful for RPGs). Note that the roll button will work anyway, but this column lets you specify the weight of each row using ranges.
- Dice Button: use this to create dice roller buttons for each row. In each cell, type a dice formula (such as 1d6+3) and it will be turned into an interactive dice roller in Presentation view.
- Number: for numbers and mathematical symbols.
- Long Text: it's like the Text option, but designed for longer pieces of text.
- Table: use it to link to another interactive table.
The Image, Article, Link/URL, and Table fields can be configured to open automatically. If you do this, when you roll on the table (if there is a roll column), the automatic element of the chosen row will be automatically opened. If there are multiple elements, only the left-most one will be displayed.
Tweaking the Table
You can use the
three-dots button next to each column name to reorder them using a drag-and-drop system. Additionally, when you hover a column header, an
edit button will appear —use it to change the column's settings, to hide it from presentation, and to delete it. Finally, you can drag and drop the borders between the column headers to make them wider or narrower.
If you create a row that you no longer need, you can delete it with the
bin button on the left. You can also drag-and-drop the
icon to reorder the rows. If you want to delete multiple rows, click on the checkboxes of every row you wish to delete and then the red
delete button that will appear at the bottom.
Advanced Options
This tab has some options you can tweak to customize how the table behaves:
- Display title: check it if you want the title you defined in the table settings to be displayed on top of the table as a header.
- Rollable: check it if you want the roll button. If you didn't add a roll column to the table, it will pick a row at random (all have the same chance).
- Enable Search: check it if you want the search bar (useful for long tables).
- Show Description: check it to display the table's description under the table.
- Enable Collapsed: readers will be able to collapse the table, similar to spoilers.
- Start Collapsed: the table will be collapsed when readers access the page until they click the button to uncollapse it.
Style Options
You can easily tweak how the table looks without using CSS. Simply use the
Style section to change background and text colors for both header and regular cells, as well as border color. You can also specify a CSS class that you can then use in your CSS stylesheet.
The tables themselves have special CSS classes applied to each element. You can find a list of them
here.
Using a Table
To embed a table in an article, use the
Embed button on top of the table. This will copy a BBCode tag to your clipboard that looks like [itable:ID] (where
ID is a set of numbers and letters).
Simply paste it anywhere and when you view the article the table will be there. The table will look very similar to the preview, just without the editing options. Use the
roll button to randomly select a row and the search bar to search inside the table.
Note: Do not use tables in spoilers. They will not generate properly. Instead enable the collapsed feature.
Is there a way to embed a prefiltered table into an article? For example, I have an interactive table of player races and their stats, including dwarfs, and I want to embed the table already filtered for 'dwarfs' in an article. Is this possible?
Hi! Table can only be embedded in tis full form. The only options you can tweak are the ones that appear under "Advanced Settings", which apply to all instances of the table. Hope this helps!