I came across Convergence in my search for an easy way to implement a live code editor to allow students using our in-house IDE to share their code with instructors to get help by having instructors directly look at and edit the code. The full code editor example was really helpful and easy to deploy on our server, with a Convergence Omnibus Docker container running behind a node.js proxy, which itself handles all user authn/authz and the actual IDE.
However, I started having issues when trying to merge the Ace-specific example into our IDE.
I’m attaching a GIF showing what happens when I try to run the example code with our Docker Convergence Omnibus container + node.js proxy (which I determined was working with the help of the other code editor demo I linked above).
As you can see, when I move the other person’s cursor around, my remote cursor is not following the other one. Making edits works just fine, but the entire time, the remote cursor on both sides just remains at the top of the editor, and selecting content also starts from that point.
I have spent quite a few days trying to pinpoint the part of the code that’s not letting cursor position get updated, but to no avail. The only changes I made was to copy over the index.html from the Convergence example itself, stripping it down to the basic Ace editor used, changing the paths to locally hosted versions of the Convergence libraries (that I got by installing via npm as per the instructions) and changing the ace.js file in that folder to use a specific username and convergence ID.
Where should I look to fix my issue? I know it’s not the server because as I mentioned it works with the full-fledged code editor demo, just not the Ace-specific one, so it has to be in the client-side code for the example.