mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	Add full text search in autocomplete
This commit is contained in:
		
							parent
							
								
									0d9e13c1e0
								
							
						
					
					
						commit
						e877ad68cf
					
				| @ -30,6 +30,15 @@ async function autocompleteSourceForCKEditor(queryText) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| async function autocompleteSource(term, cb, options = {}, fastSearch = true) { | async function autocompleteSource(term, cb, options = {}, fastSearch = true) { | ||||||
|  |     if (fastSearch === false) { | ||||||
|  |         cb( | ||||||
|  |             [{ | ||||||
|  |                 noteTitle: term, | ||||||
|  |                 highlightedNotePathTitle: `Searching...` | ||||||
|  |             }] | ||||||
|  |         ); | ||||||
|  |     } | ||||||
|  |      | ||||||
|     const activeNoteId = appContext.tabManager.getActiveContextNoteId(); |     const activeNoteId = appContext.tabManager.getActiveContextNoteId(); | ||||||
| 
 | 
 | ||||||
|     let results = await server.get(`autocomplete?query=${encodeURIComponent(term)}&activeNoteId=${activeNoteId}&fastSearch=${fastSearch}`); |     let results = await server.get(`autocomplete?query=${encodeURIComponent(term)}&activeNoteId=${activeNoteId}&fastSearch=${fastSearch}`); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 SiriusXT
						SiriusXT