mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 17:26:38 +01:00
finished jump to autocomplete, now with token highlighting, #203
This commit is contained in:
@@ -6,20 +6,14 @@ async function autocompleteSource(term, cb) {
|
||||
+ '?query=' + encodeURIComponent(term)
|
||||
+ '¤tNoteId=' + noteDetailService.getCurrentNoteId());
|
||||
|
||||
if (result.length > 0) {
|
||||
cb(result.map(row => {
|
||||
return {
|
||||
label: row.label,
|
||||
value: row.label + ' (' + row.value + ')'
|
||||
}
|
||||
}));
|
||||
}
|
||||
else {
|
||||
cb([{
|
||||
label: "No results",
|
||||
value: "No results"
|
||||
}]);
|
||||
if (result.length === 0) {
|
||||
result.push({
|
||||
title: "No results",
|
||||
path: ""
|
||||
});
|
||||
}
|
||||
|
||||
cb(result);
|
||||
}
|
||||
|
||||
async function initNoteAutocomplete($el) {
|
||||
|
||||
Reference in New Issue
Block a user