We can press Ctrl + F
in browser to find a text on the page as it gets highlighted if found a match. Even we can use good browser extensions to define our keywrords and then use the extension interface to highlight all occurrences etc.
Note: We must use Internet Explorer
Problem: For some particular application, the data is received as rich text box/rich text format. So we cannot use browser Ctrl + F
or any extension to highlight the text. The simple reason is the text is inside the value
attribute and not as typical HTML element text.
What I have tried or can do: I have tried browser extensions, Ctrl + F
but it wont highlight the words. I can develop a winform application, embedding an IE control in it but still I am not
sure how the highlight feature can be achieved, or even if its possible in this scenario or not.
Please also note that I don't have any control to change the HTML code, otherwise I would already have done it)
So is there a way the highlight effect can be achieved? please help (for instance I want to highlight the words 'converted' and 'value' from the following sample code)
<object name="TextData" classid="clsid:4cbabd-ff93-431-a92f-2fa664f970" codebase="ppp13.cab" id="TextData" style="border-width:0px;border-style:None;height:186px;width:98%;">
<param name="WordWrap" value="True">
<param name="PrintViewMode" value="True">
<param name="FittedView" value="False">
<param name="ShowStatusBar" value="False">
<param name="ShowRuler" value="False">
<param name="ShowToolBar" value="False">
<param name="BorderMargin" value="True">
<param name="RTFOutput" value="True">
<param name="ReadOnlyMode" value="True">
<param name="VertScrollBar" value="True">
<param name="HorzScrollBar" value="True">
<param name="TerKey" value="8YP41-NM5Q2-34BL3">
<param name="Data" value="{\rtf1\ansi\deflang1033\ftnbj\uc1\deff1
{\fonttbl{\f0 \froman \fcharset0 Times New Roman;}{\f1 \fswiss Arial;}}
{\colortbl ;\red255\green255\blue255 ;\red0\green0\blue0 ;}
{\stylesheet{\f1\fs24\cf2\cb1\ulc2 Normal;}{\cs1\cf2\cb1\ulc2 Default Paragraph Font;}}
{\*\revtbl{Unknown;}}
\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\headery720\footery720\deftab720\formshade\aendnotes\aftnnrlc\pgbrdrhead\pgbrdrfoot
\sectd\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\headery720\footery720\sbkpage\pgncont\pgndec
\plain\plain\f1\fs24\qc\lang1033\hich\f1\loch\f1\b 1cm \b0 = to \b 10mm \b0 Thus value of 10 cm is converted into 100mm.\plain\f1\fs24\par}
">
<param name="InWebTer" value="True">
</object>