Argument Presets
Most of the time, you probably won't need to create elements manually - you can simply use presets. Element presets are invoked like an element, but prefixed with ! instead of :. A number of default presets are pre-defined (and styled by the included themes). They are:
!lor!label-:th {-1 .infobox-label}!dor!data-:td {-1 .infobox-data}!hor!header-:th {--1 .infobox-header}!ior!image-:td {--1 .infobox-image}!tor!title-:ca {.infobox-title}
You may define your own presets in \.obsidian\plugins\obsidian-infobox\presets.json (currently requires reload after editing). This defines two sets of presets: boxTypes and elements. The defaults are not present in the JSON, but may be overwritten by it, so any plugin updates will not overwrite your presets.
Elements are <string, object> pairs. The string is the preset id invoked by prefixing that string with !. The object contains properties that will be assigned to the element. These are:
element: stringaliases: string[]classes: string[]attr: { [string]: value }
Here is an example of a presets.json that defines a single element:
{
"elements": {
"z" : {
"aliases" : ["zoo"],
"element" : "td",
"classes" : ["zoo"],
"attr" : { "test" : "foo" }
}
}
}
!z or !zoo will create a table cell with the class zoo and the attribute test set to foo. In this way, you may define any amount of presets for ease of use.