Results 1 to 3 of 3

Thread: Contenteditable Div Caret Position

  1. #1
    Join Date
    Sep 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Contenteditable Div Caret Position

    I have a div tag that is contenteditable so that users can type in the div. There is a function that adds a link into the div when the user presses a button. I would like the caret to be positioned after the link so that users can continue to type. The link can be inserted many times.

    Example Code:
    Code:
    <div id="mydiv" contenteditable="true" tabindex="-1">before <a href="#">link</a> after</div>
    I require this code to work in: IE, Firefox, Opera, Safari and Chrome.

    Can anyone offer any help?

  2. #2
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Can we please see all your code?
    Jeremy | jfein.net

  3. #3
    Join Date
    Sep 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Nile View Post
    Can we please see all your code?
    Does this help?
    http://stackoverflow.com/questions/3...nteditable-div

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •