BerndGabriel / HtmlViewer

The well-known Delphi/Lazarus HtmlViewer/FrameViewer
Other
395 stars 147 forks source link

Document manipulation, highlighting. #348

Open jd-s opened 5 months ago

jd-s commented 5 months ago

Dear all,

I have been struggling with this issue for some days, but I am not sure if there is a solution - even after consulting the documentation, digging throught the code and even the related issues #261 #164 were no help.

My usecase is the following: The HTML contains several links with href and class. When hovering a link, all links with the same class should be highlighted. Usually, this is simple JavaScript changing the CSS of a particular class. In this case the only solution was to store the HTML, manipulate it at the OnHotSpotCovered event and call the LoadFromString method. However, this causes quite a long delay, making this solution unusable.

I was also trying to iterate through the different lists provided by HtmlViewer: LinkList does not seem to have references to changable objects, SectionList does not contain the Links (and in my case it simply contains nothing). I am also not sure at which class I should aim? TBlock?

Less difficult would be to simply manipulate the