简体   繁体   中英

Real-time collaborative rich text editing

I would like to have a real-time collaborative rich text editor for my webapp. So far i've done a LOT of research and i'm really a bit frustrated that there is nothing fitting out there. The thing is, that every solution out there is tightly coupled to an editor (Firepad for example uses CodeMirror/ Etherpad uses Etherpad). There are only two other solutions i found interesting:

  • ShareJs -> works only for plain text

  • Webstrate -> This was the MOST promising to me. It can handle DOM synchronization and therefore it can handle every contenteditable - great!

But the problem with Webstrate is, that it is in an alpha Version. So for me it was too buggy - didn't work out. Tried to get it working for about 2 days. The text synchronization was easy. But it didn't work with iframes or other stuff.

My claims are pretty high for a collaborative RTE - it should support:

  • Images

  • Iframes

  • Video

  • Text (of course)

While i'm searching for about 3-4 days now for a solution - maybe someone of you has a hint? Would be very gentle ;)

The closest thing I found is http://quilljs.com/ - it has an API for getting and updating text deltas and also for getting and setting multiple labeled cursors. It doesn't manage the real-time editing for you, but it gives you enough to work with (more than any other project I found). However it is not as comprehensive as other editors in formatting (for example, it doesn't support tables and nested lists). It is somewhat extensible, so you may be able to add support for additional HTML elements.

You can try http://swellrt.org , is a complete framework to develop real-time collaborative apps including rich-text support and an editor for Web.

It provides a JS API, analogue to GD Real-time API, plus rich-text editting.

The editor can be extended to support any attachment.

It's a fork of Apache Wave that generalizes the original code.

Robust collaborative rich text editors are still somewhat bleeding edge. Most web based text editors fall into of two categories.

  1. Those that are compatible with real time collaboration but have fairly limited functionality (eg no tables, no nested elements, etc.).
  2. Those that are very robust web based rich text editors, but lack that API to integrate with real time technologies.

Then there are the collaboration engines like ShareDB, Google Drive Realtime API, SwellRT, and Convergence (full disclosure I am a founder at Convergence Labs ). These types of systems each have their own opinion on data models and how to mediate collaboration. It may be the case that the way your favorite rich text editor works internally is incompatible with the API of the collaboration engine.

The technologies out there that simply sync the DOM are interesting because they are often portable across editors and are less dependent on the editor API, but they tend to lack a lot of the required real time editing capabilities that are required for good collaboration (shared cursors, shared selections, etc.). This can be very hard to implement on top of a DOM syncing approach from outside of the engine itself. Unfortunately, without these features, the collaborative editing experience is not that great.

There are several projects out there that are attempting to remedy this situation. The folks at CKEditor are working on CKEditor 5 which has collaboration in mind. Also, over at Convergence we are trying to work with the authors of many of the popular editors to enable real time collaboration.

The reality is that it is still a pretty new space and evolving quickly. There is no tested, scalable, slam dunk solution that provides and out of the box fully capable, collaborative, free and open source editor. The situation looks to be improving over 2018. Hopefully in the next 12-24 months this becomes a much easier problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM