Date: 12/20/07 (Javascript Community) Keywords: html
How can I detect the position of cursor (caret) in WYSIWYG editor ?The WYSIWYG editor is element contents the html-document with DesignMode = On. Editor is with interactive syntax highlighting. I've attached the keypress event on iframe, so if user types some visible char, parser will highlight the syntax and update the text.But how can I restore the caret position after updating of WYSIWYG contents ?I have some ideas - e.g. to use special mark - it is Unicode char \u0xxx, that will flag the caret position.Any other ideas?Thanks.
Source: http://community.livejournal.com/javascript/148061.html