Extra - CMS Search
Provides search input functionality that hooks into the site
- Since:
- 3.0.0
- Copyright:
- (c) 2025 eVAL Agency
- License:
- The MIT License (MIT)
- Source:
- See:
Classes
Methods
(inner) clearHighlights(container)
Removes any previously added search highlights, restoring the original text.
Parameters:
| Name | Type | Description |
|---|---|---|
container |
Element |
(inner) escapeRegex(str) → {string}
Escapes a string so it can be used inside a regular expression.
Parameters:
| Name | Type | Description |
|---|---|---|
str |
string |
Returns:
- Type
- string
(inner) highlightSearch(container, query)
Wraps text matching the query in tags inside the rendered content.
Parameters:
| Name | Type | Description |
|---|---|---|
container |
Element | |
query |
string |
(inner) searchPage(query)
Run a text highlight pass against the currently rendered page.
Parameters:
| Name | Type | Description |
|---|---|---|
query |
string |