autocomplete

Settings

Name

Default value

Description

trigger

'' (empty string)

The character(s) that should trigger the autocomplete menu,

If trigger is an empty string (default), autocomplete will be disabled.

format

"citekey"

The format in which the item's citekey should be inserted.

Should be one of :

"citekey" (default)

"citation"

"tag"

"pageref"

"popover"

display

"citekey"

The text that will be displayed in the inline menu.

Should be either "citekey" (default) or "zettlr" (authors-year-title string)

Note : the query will be matched against what is displayed in the menu. This means that, with display: "citekey", the query will be matched against the citekey ; with display: "zettlr", the query will be matched against the authors-year-title string.

How to enable autocomplete

The autocomplete feature is disabled by default, unless a trigger is defined by the user.

To setup autocomplete, define the autocomplete property inside of your existing zoteroRoam_settings object :

// Example : using the @ character as trigger, with 'citekey' as format & display

// DO NOT define the zoteroRoam_settings object again
// Instead, modify your existing zoteroRoam_settings object

zoteroRoam_settings = {
    dataRequests: {
        apikey: 'XXXXXXXXXXXXXXXX',
        dataURI: 'users/1234567/items',
        params: 'limit=100'
    },
    autocomplete: {
        trigger: '@', // Show autocomplete menu when typing @
        format: 'citekey', // Insert the item as @citekey
        display: 'citekey' // Show autocomplete menu items as citekeys
    }
}

display: "zettlr"

Last updated