Tracking user caret #4955
-
Hi everyone. I'm starting to look at Etherpad for a new application and wondered if someone could recommend the best way to track a user's caret position in a plugin? I've not seen an obvious hook at first look through the documentation, however, I'm sure I've simply missed something. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Cursor or caret? Caret is flashing bar, cursor is mouse pointer. |
Beta Was this translation helpful? Give feedback.
-
Both will work. https://github.com/redhog/ep_cursortrace/ uses aceEditEvent to track other people's carets (it sends the new position to the server). aceEditEvent fires when the pad contents change, while aceSelectionChanged fires when the caret position changes. |
Beta Was this translation helpful? Give feedback.
Both will work. https://github.com/redhog/ep_cursortrace/ uses aceEditEvent to track other people's carets (it sends the new position to the server). aceEditEvent fires when the pad contents change, while aceSelectionChanged fires when the caret position changes.