Did you have a look at [y-js](https://github.com/yjs/yjs)? They claim to be suitable for p2p collaborative editing and they have bindings for other languages as well.
Early in Bike's development I did try a few solutions, but I want Bike to work on somewhat big files. See (https://www.hogbaysoftware.com/posts/moby-dick-workout/). Anytime I loaded such a file into a sync solution everything blew up.