
Open source collaborative text editors - juretriglav
https://juretriglav.si/open-source-collaborative-text-editors/
======
jahfer
A number of years back, I wrote an OT implementation in Clojure/ClojureScript
as a hobby project [1] and learned a lot along the way. I even extracting out
the core client/server implementations to their own package [2].

It's an incredibly fun topic, and one that's also really challenging. It also
gave me first-hand experience with fuzz-testing where I could simulate all
kinds of concurrent-edit conflicts and ensure both clients came out with the
same end-result. While the end client/server implementations are working, it
was a lot more effort than I anticipated building a full-fledged editor on
top. I was too stubborn at the time to attempt to integrate with existing RTEs
though, so the most notable part of the project was the core lib, not the end
product.

For those interested in implementing it for themselves, I can't recommend this
piece [3] by @djspiewak enough.

[1] [https://github.com/jahfer/ot](https://github.com/jahfer/ot) [2]
[https://github.com/jahfer/othello](https://github.com/jahfer/othello) [3]
[http://www.codecommit.com/blog/java/understanding-and-
applyi...](http://www.codecommit.com/blog/java/understanding-and-applying-
operational-transformation)

~~~
hashhar
I'll recommend this link too. Saw it on HN a long time ago. It's quite long
but very well explained.

[http://archagon.net/blog/2018/03/24/data-laced-with-
history/](http://archagon.net/blog/2018/03/24/data-laced-with-history/)

------
AnthonBerg
I found this recent paper highly enlightening: _“Real Differences between OT
and CRDT for Co-Editors”_ – Chengzheng Sun, David Sun, Agustina, Weiwei Cai,
October 2018.

Arxiv meta:
[https://arxiv.org/abs/1810.02137](https://arxiv.org/abs/1810.02137)

PDF:
[https://arxiv.org/pdf/1810.02137.pdf](https://arxiv.org/pdf/1810.02137.pdf)

It’s well written imo. The conclusions chapter is very good.

“In this work, we have critically reviewed and evaluated representative OT and
CRDT solutions, with respect to correctness, time and space complexity,
simplicity, applicability in real world co- editors, and suitability in peer-
to-peer co-editing. The evidences and evaluation results from this work
disprove superiority claims made by CRDT over OT on all accounts.”

And it is also argued that OT is a more direct approach to the fundamental
issues of realtime multiuser editing, and that that directness brings
effectiveness.

HN discussion:
[https://news.ycombinator.com/item?id=18191867](https://news.ycombinator.com/item?id=18191867)

~~~
mkl
Do you have any idea which would be better for a vector based drawing app? The
data is mostly strokes (lists of points), and individual strokes generally
don't change.

~~~
alpyne
From the introduction:

"After over a decade, however, CRDT solutions are rarely found in working co-
editors or industry co-editing products, but OT solutions remain the choice
for building the vast majority of co-editors. In addition, the scope of nearly
all CRDT solutions for co-editing are confined to resolving issues in plain-
text editing, while the scope of OT has been extended from plain-text editing
to rich text word processors, and 3D digital media designs, etc."

~~~
mkl
I'm not sure what to make of that, though, as there seem to be quite a few
different JSON CRDT libraries, for example.

Just after that it says "The contradictions between these realities and CRDT’s
purported advantages have been the source of much debate and confusion in co-
editing research and developer communities." That's kind of my
question/confusion: people writing CRDTs really talk them up, and I can't tell
what's true in practice. I have no way to judge the accuracy of this paper
myself (I don't know enough to really understand it), so I'm hoping someone
who knows this stuff in a practical way can shed some light on it.

~~~
AnthonBerg
I found that I could eventually power through the paper. I thought it was
beyond me at first. Then I got angry and just shoved piece by piece into my
head :) Not in linear fashion, and it didn’t happen quickly. Actully not that
slow either once I got going. I found I was maybe rather more of a paper-
reader than I assumed I was. Probably you too!!

~~~
scofalik
So, what is your conclusion after reading it?

~~~
AnthonBerg
I found the arguments convincing, and will be moving towards OT in general.
From outside it feels like OT is generally closer to how I tend to think.

------
houshuang
Surprised the author didn't mention Quill.js, which works really well with
ShareDB, and is fully open source. We've been doing a lot of fun stuff with it
- here's a talk I gave recently as a job talk:
[https://www.youtube.com/watch?v=gN37rJRmISQ](https://www.youtube.com/watch?v=gN37rJRmISQ).
(It worked, I got hired :)). As a side project, I'm working on a ShareDB
backed wiki, where we can use rich text for editing pages, but also other
components, like spreadsheets or mindmaps, and everything supports live
editing - I think it would be amazing for classrooms, hackathons, any kind of
meeting etc. Would love to talk with anyone interested in collaborating. I
have been waiting for a few features to complete to make a proper demo video,
but this early one shows off some of the ideas:
[https://www.youtube.com/watch?v=9-lU-
in3ydc](https://www.youtube.com/watch?v=9-lU-in3ydc)
([https://github.com/chili-epfl/FROG](https://github.com/chili-epfl/FROG))

~~~
nateps
Thanks for the shoutout! We are actively developing on ShareDB
([https://github.com/share/sharedb](https://github.com/share/sharedb)) and if
anyone is really interested in this, please reach out to me
([https://github.com/nateps](https://github.com/nateps)). Also, Lever is
looking to hire someone to work full time on our internal + open source
frameworks including ShareDB.

~~~
oefrha
Thanks for ShareDB! Funny thing, I was looking for a self-hosted real-time
collaborative editor myself just a week ago, and landed exactly on Quill.js
backed by ShareDB. (I also considered SharedDB-backed Monaco, but it doesn’t
seem to support OT out of the box, whereas Quill is literally plug and play.
Of course one can write a translation layer between Monaco’s change events and
OT.)

~~~
nateps
That's awesome! Let us know how it goes.

------
arendtio
What many people not fully grasp, at first sight, is that offline support for
a collaborative editor is at least an order of magnitude more complex than
just building a collaborative editor. In online collaborative environments,
solving conflicts is relatively simple, as the changes are supposed to be
small. But when two (or more) people are working on the same document without
synching it for hours or days, the merge strategy has to be extremely good to
come up with anything remotely intended (assuming the authors had a common
intention).

So just because your favorite editor can be used offline and it has an
(online) collaboration feature, does not mean it is capable of being an
offline-capable collaborative editor.

~~~
lewisjoe
This is where differential synchronization shines (basically git). While
OT/CRDT are really good for syncing small edits, they suck at being eventually
consistent (with intentions preserved) on very large edits.

We make a powerful collaborative word processor for the browser (Zoho Writer
[https://writer.zoho.com](https://writer.zoho.com)) with complete offline
support. This is one problem we'd like to solve in the long term. One way to
solve this is to fallback to differential sync when syncing huge offline edits
- and present the changes as tracked-changes (underlined and striked-out) to
the user. This way the user has the power to resolve the conflicts, instead of
the app messing it up by itself.

I'd like to hear if there are better ways to sync large offline edits, with
the intentions preserved.

~~~
scofalik
> One way to solve this is to fallback to differential sync when syncing huge
> offline edits

This is another question -- does automatic syncing make sense for huge
differences in users' contents? The answer might be no.

OTOH, isn't this a rare scenario? How perfect it has to be?How much of a
compromise can the users accept? These are interesting questions which shows
that creating this kind of software isn't easy -- both from technical and UX
point of view.

~~~
qpiox
First of all when discussing about offline edits we should make effort to draw
attention that "offline" could mean different thing to different people.

Offline editor from the point of view of the app's software developer might
mean that editor can sometimes survive few minutes of lost connectivity, after
which it will reconnect and possibly sync the team work.

Offline from the perspective of a team of scientists writing a joint paper
means that some of them will take their work truly offline, to a secluded
mountain hut, for an extended period (week or month) and will come back with a
complete rewrite of the text to the point of being unrecognizable to the other
authors. And then the coauthors will disagree with most of it, and will want
to revert some of the pieces and keep some other pieces.

And scientists are not the only people needing joint collaborative
environment. And not just for short papers. Few years ago, I was working in a
larger team with a group of people doing revisions of a book, and there were
so many revisions and revisions of revisions of revisions, and zillions of
comments, that we had to split the book not in chapters, since Word got stuck
even with 20-page chapters. We had to split the chapters in sub-chapters, of
5-10 pages in separate files, so that the processor would not get stuck with
the myriad of comments and revisions.

These are all separate scenarios in collaborative writing, and there could be
many other scenarios, so any solution should first explain for what type of
scenario is it really targeting. Automated sync of collaborative work is not
always the best thing to do.

~~~
bluGill
Then there is the science fiction version where the editors are both online,
but several light years apart with the resulting lag in updates.

------
alalonde
Indeed, the space is growing quickly. I run a company that provides a backend
for real-time collaboration, so we necessarily stay on top of what's out
there. There's a reason the server-side tech tends be paid: it is
extraordinarily difficult to provide guaranteed eventual consistency of data
at low latency. The CKEditor guys (and us, for that matter) have put YEARS of
development effort into their solutions.

We're working on both offline mode and a generic rich-text data model with
support for the major editors.

If anyone's interested, I'd happily do some Q and A here.

~~~
pmontra
Are you working only with editors running inside web browsers or also native
ones? What I would like to have is something that bridges two native editors,
let's say emacs and VS Code, and let's a team share the editor (whatever each
developer's preferred editor is) and not only the screen on Slack or similar.
That would be great for remote pair programming. I guess there would be a
protocol for selecting the buffer/tab and opening files (with local approval
to prevent remote file reads/writes).

~~~
lloeki
> What I would like to have is something that bridges two native editors

The big failing of co-editors is that currently they all silo into a single
editor. THat's OK for e.g co-editing stuff on a web platform (e.g Google Docs)
but it totally sucks for collaborating on code/documents you edit locally,
forcing everyone to use the same editor/IDE, which ultimately fails because no
one will use the same editor/IDE across a whole company/team/project, so
although useful I've never seen one take hold for anything but a very short
amount of time in any company.

We desperately need (a couple of) well-defined _protocols_ that get
implemented across editors, and one to emerge as a widely supported winner,
whatever its shortcomings.

~~~
mmacfadden
For plain text, this is not so hard. The data model for plain text (e.g. a
string) and the set of mutations on that model are pretty small. Also
describing where a cursor is and what is selected is likewise fairly straight
forward. Co-editing between plain text editors is completely doable, IMHO.

It's much harder for rich text editors (RTEs) because the various RTE's vary
widely in the exact subset of rich text features they support. One will
support tables, and another will not. One will support video and another will
not. One will use a linear position to describe where the cursor is, and
another will use a DOM Range. This makes it very hard to support co-editing
between different rich text editors. It's not impossible, just hard enough
where most of us are not tackling it.

------
Iv
I love your description of "the dive". I am happy to see I am not the only one
experiencing these recurring devouring interests that bring me much much
deeper than I would like to go until I am starting to fork a github repo at
2am wondering "what the hell am I doing?"

And that article is tangentially related to a recurring interest of mine
(shared editable 3d universe in which you can code collaboratively). If you
happened to have an article comparing the merit of several server
architectures/algorithms for collaborative text edition, I think many things
can be related. I am now reading about CRDT (What the hell am I doing?) and
that's something I may use to edit a scene graph collaboratively!

~~~
juretriglav
Hey thanks for that. :) Diving is super fun but also exceptionally exhausting.
But often it's impossible to 'load' a complex problem in your head if you
don't dive in for hours. Would be nice if there was a less stressful way.

In terms of editable 3d universes (whoah!), have you considered chucking
together Three.js's JSON scene description
([https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-
fo...](https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4))
with
[https://github.com/automerge/automerge](https://github.com/automerge/automerge),
a CRDT for JSON? What could possibly go wrong?!

~~~
ilaksh
ShareJS has a JSON editor example
[https://github.com/josephg/ShareJS/tree/master/examples/publ...](https://github.com/josephg/ShareJS/tree/master/examples/public)

~~~
Iv
Thanks! But a big part of my obsession is to be able to modify a 3d universe
from within.

I won't claim it is practical or a good idea in any way, just an obsessive
thing I want to try.

~~~
ilaksh
Right I understood that. I was replying to the other guy who suggested putting
the scene in a JSON Three.js thing. So the idea was that the thing I suggested
was just a possibly easy way to get a collaborative JSON editor into your
program.

------
im_down_w_otp
I would be very appreciative if Google made a stripped down version of Google
Docs for plaintext editing.

There are a bunch of basic integration features that would also be fantastic,
but if the product was literally just Google Docs, minus the WYSIWYG bits, and
all plaintext w/ maybe some syntax highlighting thrown in, I'd be super happy.

~~~
choward
> Google Docs, minus the WYSIWYG bits, and all plaintext w/ maybe some syntax
> highlighting thrown in

And the feature creep begins. Eventually you'll be asking for a full blown
IDE.

~~~
ma2rten
Google has actually already has an internal cloud-based IDE.

~~~
londons_explore
Which doesn't do real-time collaboration, and due to the way it's backing
store works, likely never will.

------
jimpick
A few other CRDT / collaborative text editor links I've collected:

* [https://blog.datproject.org/2019/03/05/caracara-react-dat-au...](https://blog.datproject.org/2019/03/05/caracara-react-dat-automerge/)

* [https://conclave-team.github.io/conclave-site/](https://conclave-team.github.io/conclave-site/)

* [https://github.com/noffle/hyperpad](https://github.com/noffle/hyperpad)

* [https://xi-editor.io/xi-editor/docs/crdt.html](https://xi-editor.io/xi-editor/docs/crdt.html)

* [https://github.com/atom/teletype-crdt](https://github.com/atom/teletype-crdt)

* [https://github.com/atom/xray](https://github.com/atom/xray)

* [https://github.com/MicrosoftDocs/live-share](https://github.com/MicrosoftDocs/live-share)

~~~
jimpick
Also: [https://github.com/gritzko/swarm](https://github.com/gritzko/swarm)

------
alceta
We went with CKEditor5 with a commonmark backend and I cannot recommend it
more highly. commonmark data is converted upon initially opening and when
closing the editor, allowing all native functionality to happen efficiently.

However I do note that we do not yet have a production ready backend for
collaborative editing. I would suggest to use their service if possible, since
we're developing an open source product it would not be an option for us.

There is a quite leaning curve when implementing new plugins due to the strict
separation of model and data (commonmark in our case) and user-facing views.

~~~
juretriglav
CKEditor 5 looks amazing (from tech to docs), but that lack of an available
backend is a bummer. Do you know if there's anything out there that would work
as an initial/hacky/example backend? How do you plan to tackle this?

------
hyperion2010
All I want is org mode backed by a crdt or similar so I don't have to convert
in and out every time I need to collaborate with someone.

------
mochidusk
I was able to get real-time collaborative text editing to work on one of my
side projects by combining quill.js[1], ot.js[2], and firebase[3]. This was a
few years ago when there weren't any fully open-source options. I'm in the
process of switching out firebase for an elixir/phoenix backend[4]. I'm really
glad for this article because it captures the exact feelings that I have.

[1] [https://quilljs.com/](https://quilljs.com/) [2]
[https://github.com/Operational-
Transformation/ot.js/](https://github.com/Operational-Transformation/ot.js/)
[3] [https://firebase.google.com/](https://firebase.google.com/) [4]
[https://github.com/phoenixframework/phoenix](https://github.com/phoenixframework/phoenix)

~~~
ilaksh
That looks like a really cool project but.. there weren't any fully open
source options? The original Etherpad came out 10 years ago. Etherpad Lite has
been out for several years also and has had formatting plugins for quite
awhile.

~~~
mochidusk
You're right, I completely forgot about Etherpad. But I don't consider
Etherpad the same as Quilljs or ProseMirror. Etherpad is something you host
(an app itself) while the other text editors are something you can build
upon/integrate into your app. I didn't want to host an instance of Etherpad, I
needed a library.

I wanted an editing experience similar to Medium.com text editor: consistent,
well-formed html output and formatting. At the time, Quilljs was one of the
best open-source editor that produced consistent output regardless of the
browser.

Also I didn't want to store html, I wanted to store operations in the
database.

I have an app similar to Figma[1] (basically real-time Sketch) and I needed
just the real-time text editing feature.

[1] [https://www.figma.com/](https://www.figma.com/)

------
jsilence
What about Cryptpad? [https://cryptpad.fr/](https://cryptpad.fr/)

~~~
ilaksh
Its full copyleft AGPL which could be an issue for someone trying to use it in
a commercial application.

But for other uses, it looks absolutely incredible.

[https://github.com/xwiki-labs/cryptpad](https://github.com/xwiki-
labs/cryptpad)

~~~
cobbzilla
From the Cryptpad README, gotta love the humor:

The server does have a certain power, it can send you evil javascript which
does the wrong thing (leaks the key or the data back to the server or to
someone else). This is however an active attack which makes it detectable. The
NSA really hates doing these because they might get caught and laughed at and
humiliated in front of the whole world (again). If you're making the NSA mad
enough for them to use an active attack against you, Great Success Highfive,
now take the battery out of your computer before it spawns Agent Smith.

------
threespice
This was one of the project idea I made myself work on during this April. The
motivation being, "how hard is it to make a real-time code editor". Long story
short, it is far more complicated than I had imagine and to complete in less
than a week. Implementing the CRDT itself, the logic itself is challenging and
than putting it down to code is another story.

From my understanding, an implementation of logoot[1] is built to create the
skeleton of a collaborative environment. From there on, you have the building
block to make other things work with it, such as collaborative canvas.

I built one using Socket.io on Angular and used Ace Editor own implementation
of CRDT

> [https://github.com/abdusamed91/realtime-
> codeeditor](https://github.com/abdusamed91/realtime-codeeditor)

I used the following references to build it

1) [https://alligator.io/angular/socket-
io/](https://alligator.io/angular/socket-io/)

2) [https://medium.com/@ofir3322/create-an-online-ide-with-
angul...](https://medium.com/@ofir3322/create-an-online-ide-with-
angular-6-nodejs-part-1-163a939a7929)

To get started with the theory CRDT low level algorithm, these two post go
into great details

1) [https://conclave-team.github.io/conclave-site/](https://conclave-
team.github.io/conclave-site/)

2) [http://digitalfreepen.com/2017/10/06/simple-real-
time-](http://digitalfreepen.com/2017/10/06/simple-real-time-) collaborative-
text-editor.html

[1][https://hal.inria.fr/inria-00432368/document](https://hal.inria.fr/inria-00432368/document)

I'd love to take it to another level if anyone here has mutual interest in
this field of work.

------
qpiox
I wonder why would one make a headline "Open source collaborative text
editors", and then write about online editors which are neither fully open-
sourced, nor fully collaborative. And then stop with them, without even
mentioning solutions that are both truly real-time collaborative and truly
open source.

~~~
jtbayly
Such as?

~~~
qpiox
Well some of the links that others have posted here before me are such
examples - starting with Etherpad.

I realize that the OP is about something that works with structured text, but
the headline (as is) is just click-bait.

~~~
juretriglav
That certainly wasn’t the intention, the title is a bit of a mix of: the
initial intent to list _all_ open source collaborative text editors, and then
realizing, as I state in the post, that it wouldn’t add much value to have a
long shallow list, then deciding to limit the scope significantly, but not
wanting to redesign the headline illustration, as so much effort already went
into the post (both content and the code behind it) that I just needed to stop
working on it and ship it :) Hope that makes sense!

------
johanneswilm
You should try [https://www.fiduswriter.org](https://www.fiduswriter.org). It
does have realtime collaboration, export to ODT/DOCX/Epub/LaTeX, tracked
changes, WYSIWYG interface, etc. and in the latest version even a document
template editor. I think relatively speaking it's quite developed in
comparison to some of the other word processors presented here. It does
include both frontend and backend parts to make collaboration work. (I did a
lot of the programming over the past 7 years.)

------
amplecooz
This article from the NYT tech blog is a really good read on how they created
a custom text editor for the newsroom: [https://open.nytimes.com/building-a-
text-editor-for-a-digita...](https://open.nytimes.com/building-a-text-editor-
for-a-digital-first-newsroom-f1cb8367fc21)

They built their custom app with the open source ProseMirror
([http://prosemirror.net/](http://prosemirror.net/)) toolkit.

------
nullc
Emacs can connect to multiple screens.

~~~
jsilence
Pointers?

~~~
dima55
Run and emacs server, and multiple simultaneous connections into it.

------
willvarfar
So, lots of open-source UIs that use closed-source servers for collaborative
editing?

This figures. This is one of the ways 'open source' companies can make money.

So, the author sets about making an open-source collaboration server that
inter-operates with the existing open-source editor?

Kudos!

But now the company can retaliate by adding features or inconsistencies to the
closed source server and its integration into the UI, making the open-source
server forever out-of-date and playing catch-up.

Ouch.

------
mpweiher
Another one missing:
[https://en.wikipedia.org/wiki/SubEthaEdit](https://en.wikipedia.org/wiki/SubEthaEdit)

 _SubEthaEdit is a collaborative real-time editor designed for Mac OS X. The
name comes from the Sub-Etha communication network in The Hitchhiker 's Guide
to the Galaxy series._

From 2003.

~~~
musha68k
Not sure why you got downvoted. SubEthaEdit was magical back when - here is
the link to the github repo for the recently released source:
[https://github.com/subethaedit/SubEthaEdit](https://github.com/subethaedit/SubEthaEdit)

------
ilaksh
Etherpad (etherpad lite) has plugins for formatting
[https://static.etherpad.org/plugins.html](https://static.etherpad.org/plugins.html)

You can try a lot of them out in the demo online
[https://etherpad.org/](https://etherpad.org/)

------
johnisgood
[https://gobby.github.io/](https://gobby.github.io/) ?

Not web-based though.

~~~
Svenstaro
That brings back memories. Used gobby all the way back in school.

------
houshuang
One neat thing about live collaboration is that every single edit is stored.
This enables some nice things, like seamless replay of the entire document
editing history. We've been working for a while on trying to analyze edit
histories, to see if we could predict which stage of editing a document is in,
which writing strategy users use, how a small team is collaborating etc. (Main
purpose is to support teachers using this with student groups). We have some
code here that works with Etherpad and ShareDB ([https://github.com/chili-
epfl/FROG-analytics](https://github.com/chili-epfl/FROG-analytics)), and happy
to share preprints with anyone interested.

~~~
rodneyt
Hi Houshuang - very interested in this area. My company produces a web app for
document-based collaboration in Higher Education (working with Universities in
Australia and NZ over the last 10 years). We are also research-active and
involved in collaborative research projects with a number of Unis. Please
contact me via my profile. ~ Rodney

------
LukeB42
[https://github.com/psybernetics/synchrony](https://github.com/psybernetics/synchrony)
does realtime collaborative WYSIWYG hyperdocument editing.

Imagine if Google Wave had a friends list similar to Telegram and each peer
acted as a public cache for dead hypermedia.

------
idleherb0
I’m new to the topic from a technical point of view. I was wondering if the
conflict resolving issues are fundamentally different from online gaming
scenarios. I.e., could the ways problems are solved in multiplayer games also
be applied to collaborative editors and vice versa?

~~~
arianvanp
The quake3 netcode is eventually consistent and always reminded me of CRDTs.
[https://fabiensanglard.net/quake3/network.php](https://fabiensanglard.net/quake3/network.php)

~~~
idleherb0
I was thinking exactly about q3a when I wrote the question!

------
jimbo1qaz
HackMD is a decent online Markdown editor.

------
jimpick
Another one for the list:

[https://github.com/ipfs-shipyard/peer-pad](https://github.com/ipfs-
shipyard/peer-pad)

Demo here:

[http://dev.peerpad.net/](http://dev.peerpad.net/)

(this version will launch soon as soon as we complete the “pinning” / backup
link to ipfs-cluster and make some UI tweaks)

Built with:

[https://github.com/peer-base/peer-base](https://github.com/peer-base/peer-
base)

------
petercooper
Since it didn't make the list, nor has been mentioned in this thread, I want
to recommend [https://firepad.io/](https://firepad.io/) \- we use it quite
heavily at our company. It's uses Firebase behind the scenes so is essentially
'serverless' and we use it for editing our e-mail newsletters live as a team.
It literally takes minutes to throw into an app.

~~~
OJFord
It's in the headline image.

------
usermac
Until last year and for two years I kept an Etherpad Lite to do shared text
editing and it was amazing. It was in use for three years. The only reason I
stopped using it was Google Docs, who bought the company or IP for Etherpad,
can do the same thing and therefore I don't have to do the Linux maintenance.
I even had it use SQlite as the database and it could handle as many as 30
simultaneous users without a hitch.

~~~
muxator
Etherpad has been open source since 2009, when it was bought by Google and
immediately re-licensed. It stayed open source ever since. It was written in a
mix of Scala & JS.

Etherpad Lite ([https://github.com/ether/etherpad-
lite](https://github.com/ether/etherpad-lite)) is a port to javascript, is
backed by the Free Software Conservancy and is not owned by any corporation.

Yes, if you do not mind using Google's infrastructure, Google Docs is easier &
more featureul. There are some cases in which running on premises may make a
difference, and Etherpad strives to fill that palce.

------
kemayo
Mediawiki's visual editor has a (unreleased) collaborative mode:
[https://www.mediawiki.org/wiki/VisualEditor/Real-
time_collab...](https://www.mediawiki.org/wiki/VisualEditor/Real-
time_collaboration)

Hits all those open-source client and server notes, and has the advantage of
supporting everything that mediawiki does.

------
havlenao
We (at brainioapp.com) are right now working on collaborative mind map app
that works like notes that you can convert (based on mark-down) to mind map.
It's like a combination of Evernote and XMind. Video here:
[https://youtu.be/nJjFs7GmIBQ](https://youtu.be/nJjFs7GmIBQ).

------
mrrobotchicken
Can't see any link to collaborative demos for CKEditor 5 in the article but
here it is: [https://ckeditor.com/collaboration/real-time-
collaborative-e...](https://ckeditor.com/collaboration/real-time-
collaborative-editing/demo/)

~~~
RobertRoberts
Anyone have any experience using the collaboration feature of CKEditor5 they
can share?

------
nailer
VSCode is collaborative and Open Source. You install a plugin and send someone
a link - you are then hacking on their document, in your VScode on your
keyboard with your plugins installed.

Sorry I can't remember what the plugin is called, I used it every day at my
last contract though. Made pairing super easy.

~~~
js4ever
You are talking about LiveShare plugin for VSCode

~~~
nailer
That's it - thanks!

------
keybits
I'm curious about the choice of PubSweet for the collaboration components. Can
you summarise what functions PubSweet is performing in your example app, and
are there alternatives to PubSweet that you looked at for this functionality?

~~~
juretriglav
It mainly has to do with familiarity with the framework. The focus of the work
was on the collaborative server bits, not learning a new framework/ecosystem
and I feel very comfortable in PubSweet, being its lead dev. The project also
served as an app-building exercise, as we’re just now meeting in Cambridge to
focus on that aspect and reusable components within PubSweet. And when all
said and done, there weren’t any friction points with this approach, it all
just sort of worked, from data model migrations to React frontend, so yay :)
Hope that clears it up!

------
dalore
Some colleagues at work started to use
[https://hackmd.io/](https://hackmd.io/) for collaborative editing of markdown
text. It works great.

------
atomanek
A CKEditor 5 team member here. Thanks a lot for such an in-depth analysis, the
article is a great read and we truly appreciate being a contender there.

As for the existing implementations of CKEditor 5 with real-time
collaboration, I'm afraid since the collaborative editor is usually a
component of a larger platform (publishing, e-learning, CMS, intranet,
documentation management system etc.) it'd be difficult to find something like
a publicly available real-life use case demo of it. Without much effort, you
can check out the real-time collaborative editing demos
([https://ckeditor.com/collaboration/real-time-
collaborative-e...](https://ckeditor.com/collaboration/real-time-
collaborative-editing/demo/?active-demo=collaboration)) that we have on our
website.

A while ago we started building our own internal implementation of a
collaborative document management system using CKEditor 5 and features such as
real-time collaboration with track changes (something like Google Docs) for
our own needs - hopefully, once we polish it a bit, we will be able to release
it. We are working on publishing a few case studies with existing customers,
too.

As for offline collaboration, our current solution switches the editor to
read-only when you e.g. lose connectivity, and then the editing mode is back
on when you reconnect, along with the changes that were done in the meantime
by other users when you were offline. The platform is ready to fully support
"offline" writing. We tested some more complex scenarios with one of the users
being offline - and it works (however, no periods as long as days of being
offline). We focused on delivering other collaborative editing features such
as track changes or comments that were more required by our customers. Full
support for writing while being offline is still on our roadmap, though.

As for the answer to why the collaboration component is not Open Source: we
have currently 40 people in total working on CKEditor (CKEditor 4 & CKEditor
5). Developing such a complex application takes a lot of time and resources
and we simply need money to cover the expenses. Without that, we’d not be able
to spend so much time on fixing bugs or bringing new features. Also,
unfortunately, we learned the hard way that some of the biggest IT companies
don’t want to help Open Source projects by spending even a single dollar on
them, even if they use it in an application that brings them millions of
dollars.

Regarding mobile support: CKEditor 5 works well on mobiles (with and without
real-time collaboration). The comment you referred to was about the lack of an
online demo of real-time collaboration on ckeditor.com for mobile devices. The
reason behind this decision was that we are using the sidebar for displaying
comments, which results in rather poor UX on mobiles. Fortunately, we are
almost finishing the inline annotations plugin which will display comments
inline, without using the sidebar. Feel free to assign a full Kiwi for mobile
support :)

Thanks again for the article!

~~~
tjungblut
> The platform is ready to fully support "offline" writing

how did you solve the merge when somebody comes online again but creates a
conflict with his changes?

~~~
scofalik
I don't like "merge" word because it implies how the problem is solved.
"Synchronise" would be better, as there is no merging, actually.

We use Operational Transformation, so all the changes are stored as operations
(with their most important property being path - the position where the
operation happened).

When a user comes online, they try to re-send all the operations that are
buffered and not yet sent to the server. Then it is a matter of transforming
these operations by the new operations that happened in the meantime (when the
user was offline). Of course, the user also has to accept the new operations.

This is a bigger / more complex version of the basic problem of the real-time
collaboration. During real-time collaboration with all users online you might
need to transform your operation by maybe several other operations at most.
When you go offline, it might be tens or hundreds of operations but the
problem is basically the same, just bigger.

The quality of the transformation algorithms will make a huge role in how well
the user intentions will be preserved.

"Platform is ready" means that the theory behind our solution is correct and
that we checked some moderately complex scenarios.

Edit: still, the base scenario is that the users write "online" and "offline"
kicks in when you lose a connection (for hours, even). If we are talking about
"everyone writes offline and then they magically merge" then I think this
might be a totally different feature (and maybe even outside of the editor and
inside the CMS).

------
therobot24
i feel like overleaf/sharelatex should be somewhere in this article

~~~
juretriglav
I know the folks at Overleaf and they're awesome! However, their editor is not
open source. But yes, ShareLaTex probably needs a spot on there, though I
haven't looked at it in a long while and it seems to be pretty dormant in
terms of development:
[https://github.com/sharelatex/sharelatex/graphs/contributors](https://github.com/sharelatex/sharelatex/graphs/contributors)

Had no idea it had real-time collaboration... Wonder how it's done. Digging in
now... :)

If you're using it, it would be great to get your thoughts on it and what
particular things you like about it.

Update: ShareLaTeX uses a string-based collaboration algorithm (i.e. LaTeX is
plain text, not a structured document format), and seems to be limited to max
2 collaborators (though that could be old info), so that explains why it
didn't appear on my radar. I'll take it for a spin anyway, thanks!

~~~
williamstein
"seems to be pretty dormant in terms of development" \-- that's because
Overleaf purchased ShareLaTeX. [https://www.overleaf.com/blog/518-exciting-
news-sharelatex-i...](https://www.overleaf.com/blog/518-exciting-news-
sharelatex-is-joining-overleaf)

Also, you might be unaware of CoCalc, which is open source
[https://github.com/sagemathinc/cocalc](https://github.com/sagemathinc/cocalc).
CoCalc supports collaborative editing of many structured documents, including
Jupyter notebooks, but not rich text at present.

~~~
jdleesmiller
Hello, cofounder of Overleaf here.

Just to be clear, open source development of ShareLaTeX is ongoing and indeed
has accelerated since Overleaf and ShareLaTeX joined forces. ShareLaTeX is
split into many repos, and the one linked above is a 'coordinator' repo that
doesn't get updated much. See [https://github.com/sharelatex/web-
sharelatex](https://github.com/sharelatex/web-sharelatex) for one that is more
active.

The free version of Overleaf/ShareLaTeX does have a restriction on the number
of collaborators: you plus one other. Paid accounts support more collaborators
[1], and you can also get more collaborators on the free account by referring
others [2].

[1]
[https://www.overleaf.com/user/subscription/plans](https://www.overleaf.com/user/subscription/plans)

[2] [https://www.overleaf.com/user/bonus](https://www.overleaf.com/user/bonus)
(requires an account)

------
ohiovr
Collabora and onlyoffice are pretty good if you are looking for functionality
similar to google docs.

------
Fnoord
tmux + vim (akin to Windows Remote Assistance) can be good enough in some
situations.

~~~
arendtio
Not really. I use tmux + vim on a daily basis, but it starts with having just
one cursor. Goes on with not being web-based and in the end, it has no offline
collaboration support (that requires some kind of merge strategy).

So yes, there are some use-cases when it is sufficient for collaboration, but
most certainly not for the use-cases described in the blog post.

~~~
Fnoord
My use-case isn't similar to the ones described in the blog post.

You could easily make tmux + vim web-based if you desire (I don't see why, I'd
just use Mosh or SSH instead). For merging you could abstract the content to a
Git repository. For multiple cursors you could try Wemux [1].

[1] [https://github.com/zolrath/wemux](https://github.com/zolrath/wemux)

------
c0g
Any whiteboard products? Collaborative drawing would make remote work lovely.

~~~
phillc73
I've just found that Cryptpad offers a whiteboard feature.[1] I know nothing
more about them and was just checking them out after seeing the comment in
this thread.

[1] [https://cryptpad.fr/whiteboard/](https://cryptpad.fr/whiteboard/)

------
mushufasa
The author didn't mention TinyMCE. Was that on purpose? Is it not good?

~~~
jldugger
Does it support real time collaborative editing?

------
Philipp0205
Is there a way to use one of them without hosting it yourself?

~~~
tjmehta
Also check out [https://codeshare.io](https://codeshare.io)

~~~
Philipp0205
Ty!

------
karimtr
Awesome! Thanks for sharing :D

------
marknadal
For anyone who wants a quick primer on OT / CRDT text algorithms:

[https://gun.eco/explainers/school/class.html](https://gun.eco/explainers/school/class.html)
( Cartoon Explainer! )

For a detailed deep dive, including RGA:

[https://www.youtube.com/watch?v=yCcWpzY8dIA](https://www.youtube.com/watch?v=yCcWpzY8dIA)

