For many years I was pursued by this itch - trying to find a “perfect” text editor for collaboration. But not just any text editor that supports collaboration, oh no, my task is to find (well, at least search) open text editors with real-time group work
(i.e. not only plain text, but also structured content). Thus, the focus of this article is on the rather niche category of open source tools and the technologies on which they work. If your interests are broader, you can refer to this constantly updated list of editors
So. I jumped off a cliff many times and dived into a virtually endless sea of real-time collaboration programs. Flying down, this invigorating dive to the bottom of the pool, I already know very well. It usually begins with some initial excitement and surprise ( leap
) of new low-level technologies and research, followed by a feeling of congestion and a desire to emerge ( hey, it's pretty deep
) and explore the applied part, and then the period when my thoughts are best described with the phrase: “Am I really that stupid for this?” (quite likely), because usually the documentation, demo and code do not exactly match or make sense, the collaboration component on the server does not start and there are borderline situations where more than two users enter the same word, and ... that’s where it ends ( surfaced, gasping for air
After this, it is difficult to raise the topic again, the next stage is a kind of winter of thinking, in a dream, waiting for the harsh weather, when I usually allow the half-ready code to work for months ... or years. Until we meet again, conflict-free replicated data type!
Pic. 1. Jump
The fact is that in 2017 I was so excited about the prospects of one algorithm (a kind of CRDT
), described in research article
, only to find out that there is a borderline situation in the scientific article itself that does not provide a solution (well ... but maybe all the same?). At that time I turned to the author, but did not receive a response, and found that this particular border situation was considered in a similar algorithm by another team, but hell, because of these subtleties in the implementation, I could probably transfer it to Lisp ... SO STOP! What's going on here? Of course, I do not want to introduce a new algorithm from research work and fix its problems! What am I doing, how did I get here? Let's rewind!
What I (and probably you, too, dear reader) really need is a plug-and-play editor, a finished product . Which solves the problem of real-time collaboration. Which allows several connected users thousands of miles from each other to edit a structured document by pressing keys on keyboards and see each other’s changes on their screens. That's all. However, editors are difficult ...
and I could not find such a tool.
The year 2019 came ( itch came back with force
), and this time not only the magic editor appeared, but in fact even two applicants
to fulfill the long-awaited specification.Initially, I wanted to fly with you over the field and list almost all the text editors to work together, but it looks like this will not add much value
. Instead, let's focus on two editors who can become “the very one.”
But there are two editors, and you need to make a choice - it would be a good idea to consider which one is really better. I propose a deep scientific classification system with the following categories (using kiwi as a standard unit of good):
- Open license: adds 1 Kiwi (this is also an exception criterion )
- Support for images : adds 1 Kiwi
- Support for tables : adds 1 Kiwi
- Support for lists : adds 1 Kiwi
- Support for math : adds 1 Kiwi
- Support for real-time collaboration : adds 1 Kiwi
- Available server components : 1 Kiwi
- Support for remote cursor and selection: 1 Kiwi (i.e. you can see the cursors of other users)
- Work in offline : 1 Kiwi (it's quite difficult to determine )
- Production Experience : 1 Kiwi
- Support for mobile devices : 1 Kiwi
With such a scoring system, the editor can get a maximum of 11 kiwi units of good. Let's get started!
Figure Figure 2. CKEditor 5 interface (one of the possible options), source
Let's start with CKEditor 5, the latest version from a large line of quality editors
. He is beautiful. I know, I know that this is not a criterion, and it doesn’t matter in reality
(and we may not even agree), but I just had to say about its beauty. So this editor takes a lot of kiwi: it is licensed under the GPL ( some discussion of the limitations here
), (+1), supports images, tables, lists (+3), mathematics is supported by the plugin (+1) and it also supports real-time collaborative work
with a remote cursor and selections (+2). The creators of CKEditor have written an amazing detailed blog post about how they developed it
through operational transformations.
However, I could not find the necessary implementation of the server
for real-time collaboration, and all the documentation indicates the mandatory need for their cloud service and (paid) component even in GPL-compatible projects.
Offline support level is difficult to determine
, but it looks like it is not quite complete (for example, the editor can withstand a briefly interrupted connection, but not a few days of working offline). Probably half a kiwi? The same goes for mobile support, there is also work on full support (+0.5). And the last moment, CKEditor is definitely used in production, but I could not find a list of products based on it (+0.5).
A good editor, but the lack of an open source open source collaboration server is really depressing.
Full rating: 8.5/11
Pic. 3. Atlaskit Editor by Atlassian
About a year ago, Atlassian launched the open source Atlaskit Design
system, and many
goodies came in, including a full-fledged, ready-to-use editor based on ProseMirror
. I already feel that this may be the editor we were looking for!
It was released under the Apache 2.0 license, according to many, very open source licensing
(+1 Kiwi). It not only supports images, tables and lists, but it supports them exceptionally well (+3 kiwi)! The implementation of the tables, which most editors really miss, is done perfectly:
Pic. 4. Manage tables in the Atlaskit Editor
Unfortunately, mathematics is not supported, but the editor itself is based on ProseMirror, so it should not be a problem to add an existing solution to it (+0.5). It definitely supports real-time collaboration with remote cursors and highlights (+2), this is one of the best examples of UI support I’ve ever seen (for example, remote cursors are dimmed if they overlap with your own, and other great implementation details ). In addition, from my testing, support for working offline seems very strong (+1) - probably due to the “central competence” approach which uses for collaboration ProseMirror
. Wow, we already got to 7,5 kiwis, and many more points! Forward!
Unfortunately, this is where we face a bit of harsh reality. As in CKEditor, there is no real-time collaboration server implementation available. Lazy people. A major bummer. I wonder if this can be fixed? ..
In any case, if you continue to go down the criteria, then everything else is worthy of kiwi: it is absolutely used in production (millions of users), and it has mobile support (+2). Just when I was going to announce the winner (a total of 9.5 kiwis) and publish this post, something else appeared. It turns out that the logos and icons used in the editor, and many other Atlaskit components are licensed under the very restrictive ADG ADG license
, which states that you cannot use them outside the Atlassian universe. However, the same icons are widely used and tightly integrated into the editor. A major bummer number two, and I take away the kiwi. We are back to 8.5, and if you are counting, you see that the result is now the same. And it is final.
Now, if we could do something with these icons ...
After all the recent advances in online text editors, I thought it would be very sad to stay with two great editors with amazing features that you still can't use in open source projects - either because of licensing issues, lack of available building blocks, or both one and the other.
Therefore, I first developed the server side
(based on PostgreSQL, PubSweet framework and REST/WebSockets blends), the code is available here
. It is quite simple, but it does its job and provides document persistence and communication channel in real time. Surprisingly, thanks to the huge ProseMirror community, I was able to figure out how everything should work without having an exact interface specification (+1 Kiwi).
And then I replaced the icons
used by the editor with icons from the Feather set
. In particular, I had to replace three packages. Since the ADG license, among other things, prohibits any derivative work, these packages needed to be redone from scratch. Probably, because of this, some functions were lost, mainly in terms of accessibility for people with disabilities, but a good open base has been created for further development. For example, in some cases, there are no better alternatives for icons.
, so if you want to contribute to this project, here’s your first problem (+1 Kiwi)!
All this means that now we are only half Kiwi from the perfect result (but we can probably do the math). What I did not believe in when I began this journey was completed. It also means that we have a clear winner in this battle, and ultimately the Atlaskit Editor won thanks to the diverse, open and rewarding community of ProseMirror
. Check out the project documentation
for instructions on where to start. I believe that if you are starting a new project and are considering the possibility of real-time collaboration, this is a great place to start, even with all reservations
Pic. 5. Demonstrate real-time editing capabilities in the Atlaskit Editor
The final (corrected) result: 10.5/11
There are two editors that I would like to mention, although they don’t have a real-time collaboration solution right now, but both are built on top of libraries that support this functionality. Perhaps both are in the plans.
Pic. 6. Wax Editor (ProseMirror based word processor)
The first is the Wax
(named after the ancient wax tablets) from the Coko Foundation. This word processor
was first done on the Substance
), and now rebuilt under ProseMirror
). It is exclusively packed with functionality. These are not exactly the functions for which we give kiwi, but nevertheless these are excellent functions. Wax was originally built for layout of books
, it supports notes (numbered annotations common in books), history of changes, search and replacement, ornaments and others. Maybe for this give oranges
? In this case, Wax will receive 4 kiwis (open license, images, lists, use in production) and a couple of oranges, possibly four.
. This is a lot of fruit!
Pic. 7. Texture, Substance Based Editor
Finally, we have a Texture
, a very specific, professional (but open source) editor for creating scientific content in JATS format (XML standard for journal articles). If we are practicing fruit counting here, our fingers will almost certainly run out: open license, tables, images, deep support for mathematics, links and cross-references, lists, support for metadata, the list goes on!
I repeat, and Wax and Texture are great editors
, and the only thing that keeps them from the maximum amount of kiwi is the lack of co-editing features in real time, what this article is devoted to.
If you create a system in which real-time co-editing is the key component, you have chosen the right time. The landscape has matured last year, and now almost
plug-and-play open solutions have appeared here. Perhaps, with your help, in exactly one year we will have a whole range of open source projects. And perhaps, only perhaps, we will also use tools built on top of these open layers, without even knowing it.
- Historical data: causal trees and operating CRDT
- Lessons from creating a text editor in real time
- An example of an HTML word processor
- ProseMirror Co-Editing