Does anyone know if it is possible to grab the current line number the cursor is on in a text area box with Javascript?
++++++++++++++++++++++
+ Blah blah black sheep ...
+ have you an[cursor]
+
++++++++++++++++++++++
So in this example... the cursor is on line two of the text area.
I have found examples for the LENGTH of the string in the box, but not anything to do with the part you are currently editing (position of the cursor).
Worst comes to worst, the line number could be calculated by the current legnth of the string divided by the width of the box... but this does not take into account that you could move your cursor to a previous line when editing.
http://www.iuni.com/...tware/web/index.html
Links Plugins
++++++++++++++++++++++
+ Blah blah black sheep ...
+ have you an[cursor]
+
++++++++++++++++++++++
So in this example... the cursor is on line two of the text area.
I have found examples for the LENGTH of the string in the box, but not anything to do with the part you are currently editing (position of the cursor).
Worst comes to worst, the line number could be calculated by the current legnth of the string divided by the width of the box... but this does not take into account that you could move your cursor to a previous line when editing.
http://www.iuni.com/...tware/web/index.html
Links Plugins