You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to scroll textarea to the subsequent highlights, e.g. on a press on a button? I'd like to implement RegEx search within a (long, multiline) textarea, and this will highlight the results nicely, but the user would need to jump at will between the results found - just like in a regular text find on a webpage...
How could this be achieved?
The text was updated successfully, but these errors were encountered:
let marks = [...document.getElementsByTagName("mark")];
textarea.scrollTop = marks[3].offsetTop;
etc.... I'm assuming above that there is only one textarea on the page, as is in my usage scenario, and there are no elements other than added by the highlight script.
Yes, I wrote about my solution in the 2nd post in this thread... The first line collects all elements that HWT generated, and the second line tells you how to scroll to any mark element in the marks array.
Would it be possible to scroll textarea to the subsequent highlights, e.g. on a press on a button? I'd like to implement RegEx search within a (long, multiline) textarea, and this will highlight the results nicely, but the user would need to jump at will between the results found - just like in a regular text find on a webpage...
How could this be achieved?
The text was updated successfully, but these errors were encountered: