Textarea challenge: caret pos, resultant text

C

Csaba Gabor

I would like to know, please, with Firefox/Mozilla where the caret
position is within a textarea (column, line) and also the text as the
user is seeing it.

Note, I am not looking for the easy textarea.selectionStart /
textarea.selectionEnd pair. That tells me where I am within the text,
and not within the textarea (actually, even that isn't robust because
suppose the user has made the selection by dragging to the left -
there's currently no way to get the sense of direction from the
textarea's selection - but we can assume no selection for now (ie.
selectionStart==selectionEnd)). Also, "text as the user is seeing it"
means that I'd like to know where FF/Mozilla is putting the line
breaks.

Thanks for any tips,
Csaba Gabor from Vienna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top