I’m thinking if there is a way to use javascript to pick up ANY ONE sentence from a textarea simply by clicking any position within that sentence.
I’m thinking along the line of
– first, get current cursor position (which I know how)
– second, somehow locate the position of the previous fullstop and the next fullstop (how?)
– take whatever content within the two fullstops. (how?)
Or there is a simple way to do it?
I assume you already know about handling caret position and getting the content before / after the caret, so here’s a pseudocode solution: