In the HTML5 Top Navigation project, the Search field returns the first 500 or so characters of the topic, highlighting any of the search terms. This is great if the results are near the beginning of the topic, but I've been asked if it can change this to be more dynamic. Ideally, it would show ~20 characters before the first search term found, with the same 500 or so character total length. This would give users more context as to what the result is showing.
I'm not finding anything in Flare that allows this type of functionality. I'd hate to waste the time to research a Javascript solution, assuming its even possible, if someone had an easier solution. Has anyone come across something that will provide this functionality with the MadCap Search engine?