I’m making a code broadcast/share application. Currently, I’m using getValue() to send code from the broadcaster and setValue() to update viewers. This seems unnecessarily expensive, so I’m trying to use replaceRange on the viewers with changeObj sent by the broadcaster.
I’m having indent and bracket issues with this approach, similar to issue 2147 on GitHub. What is the right way to do this in the current version? I was unable to find anything on GitHub, StackOverflow or on here.
The relevant code, which applies changes to the other editor, doesn’t appear to be there. Just applying the changes provided by "change" or "changes" events, in the right order, should be all you need to do to keep another editor in sync (assuming one-way synchronization).