# HighlightKeyword | tablefilter v0.4.16 API Document

    import {HighlightKeyword} from 'tablefilter/src/modules/highlightKeywords.js'

public class | source

# HighlightKeyword

Highlight matched keywords upon filtering

## Constructor Summary

Public Constructor
public | constructor (tf: TableFilter) Creates an instance of HighlightKeyword |

## Member Summary

Public Members
public | emitter : Emitter TableFilter's emitter instance |
public | highlightCssClass : String Css class for highlighted term |
public | tf : TableFilter TableFilter instance |

## Method Summary

Public Methods
public | destroy () Remove feature |
public | highlight (node: Node, term: String, cssClass: String) Highlight occurences of searched term in passed node |
public | init () Initializes HighlightKeyword instance |
public | unhighlight (term: String, cssClass: String) Removes highlight to nodes matching passed string |
public | unhighlightAll () Clear all occurrences of highlighted nodes |

## Public Constructors

### public constructor(tf: TableFilter) source

Creates an instance of HighlightKeyword

#### Params:

Name | Type | Attribute | Description
tf | TableFilter |  | TableFilter instance

## Public Members

### public emitter: Emitter source

TableFilter's emitter instance

### public highlightCssClass: String source

Css class for highlighted term

### public tf: TableFilter source

TableFilter instance

## Public Methods

### public destroy() source

Remove feature

### public highlight(node: Node, term: String, cssClass: String) source

Highlight occurences of searched term in passed node

#### Params:

Name | Type | Attribute | Description
node | Node |  |
term | String |  | Searched term
cssClass | String |  | Css class name TODO: refactor this method

### public init() source

Initializes HighlightKeyword instance

### public unhighlight(term: String, cssClass: String) source

Removes highlight to nodes matching passed string

#### Params:

Name | Type | Attribute | Description
term | String |  |
cssClass | String |  | Css class to remove

### public unhighlightAll() source

Clear all occurrences of highlighted nodes