Right now, I have two numbers, a row number and a column number for a textarea. I need to translate that to the number of characters from the beginning of the textarea.
Example:
Row 5, character 6 should translate to 108 (The cursor is right after ornare before the period) if I have:
Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
Suspendisse scelerisque
sem in leo venenatis
ornare. Aenean non
diam eget nisl
molestie mattis.
Any ideas how to calculate this via JavaScript?
Here you go: