Slide Searching Service
A service that enables searching through presentation slides by matching keywords against slide titles, paths, and searchable content. The service uses a web worker to efficiently process slide content and maintains a cached list of searchable slides to improve performance on subsequent searches.
Components must be updated to include searchableProperties array of component options to tell the search api what component options to search for.
Properties
searchForSlidesInPresentation(keyword)
Code Example
const slideResults = await digideckCore.slideSearchingService.searchForSlidesInPresentation('some text to search for in slides');
slideResults.forEach(slide => {
console.log(`Found Slide with title: ${slide.title}, path: ${slide.path}`);
})
Arguments
| Argument | Type | Description |
|---|---|---|
| keyword | string | The search term(s) to match against slides. Multiple words can be provided space-separated and all must match for a slide to be included in results. If empty or not provided, returns all searchable slides. |
Return Value: Promise<Array<{title: string, path: string, order: number, previewImage: string, hideFromMenus: boolean}>>
Returns a Promise that resolves to an array of Slide objects with the following metadata
| Property | Type | Description |
|---|---|---|
| title | string | The title of the slide |
| path | string | The unique path identifier for the slide |
| order | number | The display order of the slide within its chapter |
| previewImage | string | URL of the slide's preview image |
| hideFromMenus | boolean | Whether the slide should be hidden from navigation menus |
| searchableSlideString | string | A concatenated string of searchable content from the slide |