notes
The notes setting lets you customize how Zotero notes are processed for Roam import
Settings
Name | Default value | Description |
|
| The type of input that should be received by the formatting function. Should be either :
|
|
| The character(s) to use to split a note item into Roam blocks. This is only used if |
|
| The name of the function to be used to parse notes for import into Roam. This should be defined in conjunction with
|
Default behavior
By default, the extension will call the built-in parser function zoteroRoam.utils.formatItemNotes(...)
, give it as input a nested Array structure (use: 'text'
) where each string element will be a Roam block (elements obtained by splitting the note on split_char: '\n'
).
This replicates the default behavior of v0.5.
However, if you are using the zoteroRoam.formatting.getChildren
utility in your custom metadata formatting function, know that it will now use the settings above to format your notes - instead of always using the extension's built-in.
So, if you change these settings, the output will be modified accordingly without you having to rewrite your function's code ๐
Examples
Changing how Roam blocks are delimited
Simply change split_char
to be whatever character you'd like.
Using a custom parser function
Write your function, with the syntax window.myParser = function(notes){...}
, and supply its name as the value for the func
argument. Set the use
parameter as needed :
If you decide to write your own parsing function, know that you'll have to clean all the HTML markup yourself. You can use the utility function zoteroRoam.utils.parseNoteBlock(item){...}
which accepts a block (a string) as input, and returns its cleaned version.
Last updated