Set focus on div contenteditable element

Posted by sanceray3 on Stack Overflow See other posts from Stack Overflow or by sanceray3
Published on 2010-03-05T16:15:21Z Indexed on 2010/05/19 1:10 UTC
Read the original article Hit count: 1298

Filed under:
|
|

Hi all,

I try to explain my problem, because I really need your help.

I have a <div contenteditable=true> where I define by a WYSIWYG some elements. For example <p>,<h1>, etc. I would like to put directly the focus on one of this elements.

For example on <p id="p_test">. But it seems that focus() function doesn't work on <div> elements, <p> elements...

Is there a another means to define the focus in my case ?

Thank you very much for your help !

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about focus