The string to highlight.
Optionalphrase: string | RegExp
The word or words to highlight.
Optionallength: number
The number of characters to truncate the string to. The string will be truncated surrounding the first match.
Whether the string is HTML to be rendered as-is, or plain text to be escaped (HTML entities encoded). In HTML, only text is highlighted: tags and attributes are left untouched.
The
highlighthelper searches for a word phrase in a string, and wraps matches with the tag.