funcmap
The funcmap setting lets you assign your own formatting functions to specific item types
Last updated
Was this helpful?
The funcmap setting lets you assign your own formatting functions to specific item types
Last updated
Was this helpful?
An Object containing zero or more type-specific properties - named after the Zotero item types - and an (optional) DEFAULT
property.
Each property should be defined as follows :
Name : the property name has to follow the Zotero data scheme. An old nomenclature of item types is available .
Value : the property's value should be a string, corresponding to a function name.
For example, defining funcmap.book
with the value "customBookFormat"
will have the extension use the customBookFormat
function for all items of type book
.
If the funcmap.DEFAULT
property is defined, the extension will always fall back on the function it names if no specific function has assigned to an item's type.
>> The extension's built-in metadata template will never be used.
When importing an item's data into Roam, the extension will first check the item's type (i.e, its data.itemType
property) and use it to look for the name of the formatting function that should be used to produce Roam blocks.
The extension's query path will check the existence of the following, and use the first defined value :
zoteroRoam_settings.funcmap[itemType]
, which can be used to provide a specific formatting function for a particular item type. See .
zoteroRoam_settings.funcmap.DEFAULT
, which can be used to provide a user-defined default formatting function. See .
The extension's built-in formatting function, getItemMetadata
.
Assigning custom functions to a few item types - no use of DEFAULT
Assigning a custom function for a specific item type (book section) + use of DEFAULT