views:

903

answers:

1

I'd like to highlight certain words in the document displayed in an embedded webbrowser control. I can envision a solution where the innerhtml property of the document is modified to add a colorizing < span > tag around the desired text, but I can't help feeling that there must be a simpler way?

+1  A: 

I wrote a control in which I used the Menees Diff Library to identify where differences occur (changes, additions, subtractions) and then I inserted spans at the appropriate locations starting from the end of the documents and going in reverse where the spans had an associated CSS class name.

I don't know if there was an easier way, but the solution above suited my needs and didn't take more than a couple hours to implement. I did some research before implementing but found nothing.

cfeduke