Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #25887

Re: new line in a contentEditable div

From JJ <jj4public@vfemail.net>
Newsgroups comp.lang.javascript
Subject Re: new line in a contentEditable div
Date 2014-10-04 21:34 +0700
Organization ?
Message-ID <jgys6zt6b9dd$.o7ntzhudvmry.dlg@40tude.net> (permalink)
References <4b3afe79c9bbea3371221c48e0b0690a346b72d8@news.nemoweb.net> <11i6qr4ufbfa6$.ngy9og9m112f$.dlg@40tude.net> <7405a2508bc3fc78b67de288949d06f44864053d@news.nemoweb.net> <aw7kf5kpwqqf.ytgxy6uazg1w$.dlg@40tude.net> <221138482e6d39a1e4a22f0a517c2ee812329862@news.nemoweb.net>

Show all headers | View raw


On Sat, 04 Oct 14 06:09:53 +0000, Julien Arlandis wrote:
> Andhow to set the cursor position after the change?
> 
> Julien

No standard function for direct caret operations, unfortunately.

Simulating a click event using document.createEvent() and
element.dispatchEvent() may give the same effect as focusing a non-focused
content editable element. document.caretPositionFromPoint() may help you to
"feel" the element contents. Simulate navigational key presses to move the
caret.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

new line in a contentEditable div Julien Arlandis <julien.arlandis@laposte.net> - 2014-10-03 11:33 +0000
  Re: new line in a contentEditable div JJ <jj4public@vfemail.net> - 2014-10-03 19:46 +0700
    Re: new line in a contentEditable div Julien Arlandis <julien.arlandis@laposte.net> - 2014-10-03 13:13 +0000
      Re: new line in a contentEditable div JJ <jj4public@vfemail.net> - 2014-10-04 09:29 +0700
        Re: new line in a contentEditable div Julien Arlandis <julien.arlandis@laposte.net> - 2014-10-04 06:09 +0000
          Re: new line in a contentEditable div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-10-04 08:47 +0200
          Re: new line in a contentEditable div JJ <jj4public@vfemail.net> - 2014-10-04 21:34 +0700
            Re: new line in a contentEditable div Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-22 20:09 +0200
  Re: new line in a contentEditable div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-10-03 15:00 +0200
    Re: new line in a contentEditable div Julien Arlandis <julien.arlandis@laposte.net> - 2014-10-03 13:18 +0000
    Re: new line in a contentEditable div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-10-03 16:23 +0200
      Re: new line in a contentEditable div Julien Arlandis <julien.arlandis@laposte.net> - 2014-10-03 15:16 +0000
        Re: new line in a contentEditable div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-10-03 18:28 +0200
          Re: new line in a contentEditable div "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-10-03 18:54 +0200
            Re: new line in a contentEditable div "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-10-03 19:07 +0200
              Re: new line in a contentEditable div "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-10-03 19:32 +0200
  Re: new line in a contentEditable div "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-10-03 16:21 +0300

csiph-web