This function will be invoked when user executes an item you send in the search function.
id of the selected SearchResult or IndexedResult
payload of the selected SearchResult or IndexedResult
Contains extra information passed from hain when the execute event ocurred
If present, is called when an SearchResult or IndexedResult is selected from
the list and that result included a preview value.
id of the selected SearchResult or IndexedResult
payload of the selected SearchResult or IndexedResult
Call this function with html to be rendered in the preview area
This function will be invoked when user changes their query. This will be called every 30ms maximum.
The query the user has input so far
The results of the query should be added to this object
This function will be invoked once at startup. Use promises and asynchronous calls to avoid long load times.
Generated using TypeDoc
These are the functions your plugin may implement
Your plugin should return an object with references to the implemented functions.
Note that your exported function is receiving an argument of pluginContext.
Example
'use strict'; module.exports = (pluginContext) => { function startup() { // You can do any initialization here } function search(query, res) { // You can return your search results here } function execute(id, payload, extra) { // When your result is selected, you can run something here } function renderPreview(id, payload, render) { // You can render preview with HTML } return { startup, search, execute, renderPreview }; };