contenteditable divs and setting the cursor position

M

MonkeyBoy

Hi,

I am creating a WYSIWYG designer using 'contenteditable' div's. Does
anyone know how to set the cursor position within a content editable
div? (I have seen how do do this for input boxes but not div's)


Thanks,
Mark


Further Context
I am having to do some nasty intercepting of the keypresses to catch
when enter is pressed and replace the <p> tags with <br> so I don't
get a double line. I then need to set the cursor position to
immeditely after the <BR>
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top