I'd like to make some manual changes at the cursor/prompt position
inside a html form (specifically on /nsIDOMHTMLTextAreaElement/ and
/nsIDOMHTMLInputElement/ objects. I do have these objects in hands
already, and I'm also able to modify their content according to my
needs, like appending, deleting text inside html forms (via
/content//html/content/src/nhHTMLInputElement.cpp setValue methods usage).
Now, I'm wondering what interfaces or methods enable the handling of the
position of the cursor inside a form.
> I'd like to make some manual changes at the cursor/prompt position
> inside a html form (specifically on /nsIDOMHTMLTextAreaElement/ and
> /nsIDOMHTMLInputElement/ objects.
> ps: by cursor (or prompt) I meant the "thing" blinking when I input
> object has the focus :)
It is called the caret usually, with Mozilla for text input and textarea
controls there is a method
exposed to set the text selection and the caret. If you simply want to
If you want to read out the current text selection and/or caret position
you can read out properties