Does itsnat supports DocumentRange ?

10 views
Skip to first unread message

alex...@gmail.com

unread,
Mar 31, 2014, 7:00:51 AM3/31/14
to its...@googlegroups.com
It is possible to get the caret position from a content editable div using ItsNatHTMLDocument ?

Ravindranath Akila

unread,
Mar 31, 2014, 8:20:15 AM3/31/14
to alex...@gmail.com, its...@googlegroups.com
You might have to bind to a more resource intensive event such as keyup which would send the events to the server (order might not be preserved afaik). It might be better to capture it on client side and send the position to the sever when needed via a hidden element.

HTH


On Monday, March 31, 2014, alex...@gmail.com <alex...@gmail.com> wrote:
 It is possible to get the caret position from a content editable div using ItsNatHTMLDocument ?

--
You received this message because you are subscribed to the Google Groups "itsnat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itsnat+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
R. A.
BTW, there is a website called Thank God it's Friday!
It tells you fun things to do in your area over the weekend. 

Jose Maria Arranz Santamaria

unread,
Apr 2, 2014, 2:55:37 AM4/2/14
to Ravindranath Akila, alex...@gmail.com, its...@googlegroups.com
Hi all

In server side there is only DOM data from client, many things can be done in client side with pure JS code without breaking ItsNat syncs, this is the case of caret position read/modification, if you want to process in some way the caret pos in server you can send it as data attached to key events registered in server as explained by Ravin, or sending ItsNat custom events for more freedom or just do everything in browser with custom JS, ItsNat is a server centric "architectural" tool but it allows a big room for pure client side programming.
Reply all
Reply to author
Forward
0 new messages