Module: Extras/CMS-Search

Extra - CMS Search

Provides search input functionality that hooks into the site

Since:
  • 3.0.0
Author:
  • Charlie Powell
License:
  • The MIT License (MIT)
Source:
See:

Classes

CMSSearchElement

Methods

(inner) clearHighlights(container)

Removes any previously added search highlights, restoring the original text.

Parameters:
Name Type Description
container Element
Source:

(inner) escapeRegex(str) → {string}

Escapes a string so it can be used inside a regular expression.

Parameters:
Name Type Description
str string
Source:
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
Source:

(inner) searchPage(query)

Run a text highlight pass against the currently rendered page.

Parameters:
Name Type Description
query string
Source: