It would be good to mention operational transformation for managing changes between collaborators.
https://en.wikipedia.org/wiki/Operational_transformation
Quill editor has a pretty good implementation of this called “Delta” that I’ve used to build something similar before.
Not to mention Quill is a great library overall!