Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This one line was like 90% of the original implementation of Writely (the startup that became Google Docs; source: I was one of the founders).

The other 90% was all the backend code we had to write to properly synchronize edits across different browsers, each with their own bizarre suite of bugs in their contenteditable implementations :-)




This is a truly a great insight from how simple things can create industry giants like google docs.

I believe that a lot of problems can be converted into synchronization problems in browsers.

Are there any general synchronization libraries / applications that you suggest within browser / outside browser?

Thanks in advance.


Not OP, but common solutions in this space represent the state as conflict-free replicated data types (CRDTs). Some popular browser-based libraries for that are Y.js[0] and Automerge[1].

[0]: https://yjs.dev/ [1]: https://automerge.org/


By the way, for those wanting to do this but in Rust, there is https://crates.io/crates/yrs and https://crates.io/crates/automerge


And Loro [1], relatively new player which recently hit 1.0, with solid performance and some features the others don’t have

[1]: https://loro.dev/


Amazing, thanks for the link

What features does Loro have that others lack?


I thought it was a dynamic text box souped up with all sorts of tricks and semantics to make it appear like a rich text editor


I'm not sure exactly what you mean by "dynamic text box" but it was just a contenteditable div. There have been at least two complete rewrites since I was involved, nowadays I believe it's a canvas with all of the editing, formatting, layout, and rendering done "by hand" in JavaScript.


The kind of text box used in php forums ... called text area I think, and this would be hidden every time the focus went away and an HTML based layout presented in its place. This seemed to be clunky but I thought that was what made writely possible. ContentEditable is such a breath of fresh air had I ever known about it. I wonder if IE6 supported that.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: