Get text or text near caret position in Google docs with javascript

Viewed 96

There used to be elements and an iframe marking the position of the caret on google docs but the recent version of google docs changed this.

Currently the text exists as part of a DOCS_modelChunk and everything is rendered in an SVG element. I could read the information from DOCS_modelChunk but I am not sure how to get the caret position in relation to that block.

PS: let's focus on whether this is doable via dev tools first.

0 Answers
Related