Avatar of joex
joex

asked on 

finding character index of cursor in HTML document

When using webrenderer (which supports Firefox), it would be helpful to find the character index (of the cursor) when a user clicks on the screen or traverses between search terms.  To be more specific, if the plain text (the text that is actually displayed in the browser) for the HTML is 500 characters in length, the goal is to find the index of the cursor (between 1-500) each time it is moved via a mouse click or prev/next search.
HTMLWeb Languages and StandardsJavaScript

Avatar of undefined
Last Comment
Mrunal
ASKER CERTIFIED SOLUTION
Avatar of Mrunal
Mrunal
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo