TinyMCE jump to byte offset

17 views Asked by At

Two or more users in different browsers are looking at the same doc within my thin client browser app in tinymce. Only one user is Active Editor. As the active editor types, I periodically broadcast the current caret (and text content) so observers can update the text and scroll to the caret. This works if all observers are viewing a file with roughly the same view size rectangle as the Active Editor. But it fails when an observer has a different view rectangle. I tried many things to get this to work. Only jump to top or bottom always works. Adding text in the middle fails for an off-sized observer. Is there a way to get the absolute byte offset of the caret in the Active Editor and broadcast that? I need a way to jump to it in the observer.

Thanks in advance.

I tried getting caret in active editor with various tinymce api calls and send the caret to observer, and scrollTop in observer

0

There are 0 answers