How Can I Find The Cursor Location (x/y, Not Line/column) In An Html Textarea?
I'd like to display a dropdown list in a
Solution 1:
With an editable html input (in an iframe like CKeditor or Rich Text Editor or even better: jsfiddle) you could insert an empty span element at the caret position and get the position of that element to display your dropdown.
It might seem complex but I can't think of any other way to do this.
It has some extra possibilities when used for a code editor, you could color-code the text and format code like jsfiddle does, and maybe even build some kind of code-auto-complete for keywords etc.
Post a Comment for "How Can I Find The Cursor Location (x/y, Not Line/column) In An Html Textarea?"