Jump to content

Advanced Textarea


djp1988
 Share

Recommended Posts

I wish to try and develop my very own kind of text editor, I wish to create a small gif image and by clicking it, you may insert a url for an image, this would be placed at the sport your cursor was last at in the textarea, how can i detect the place the cursor was using javascript? I see there is going to be a problem as a script would need to see where the cursor was before the script is launched, so how could I do this? A tracking script that returns the last reference to where the cursor was?

Link to comment
Share on other sites

Do you mean the cursor or the caret? Because when you click the button to insert the image, the cursor has to be over that button...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...