Inspired by Sai’s blog Input: How to highlight suggestion items
It is common that we need to highlight text in table, list and other container controls. And we do not wish to iterate through all the items to highlight the text.
One way to handle this is to use a custom control and a model. The former is responsible for highlighting the text and the latter is responsible for informing the control what is the text to highlight.
Here is the JSBIN
As an enhancement, we can alter this control to do underlining or/and handle regular expression for highlighting text.