8 ms·
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% wa
by snewman 2y ago
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 :-)
- Imustaskforhelp 2y agoThis 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.
- pkage 2y agoNot 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/ https://yjs.dev/ [1]: https://automerge.org/ https://automerge.org/
- nextaccountic 2y agoBy the way, for those wanting to do this but in Rust, there is https://crates.io/crates/yrs https://crates.io/crates/yrs and https://crates.io/crates/automerge https://crates.io/crates/automerge
- babymode 2y agoAnd 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/ https://loro.dev/
- nextaccountic 2y agoAmazing, thanks for the link What features does Loro have that others lack?
- nashashmi 2y agoI 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
- snewman 2y agoI'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.
- nashashmi 2y agoThe 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.