Wiki source code of Realtime Visual Editing

Last modified by Thomas Mortagne on 2017/03/24

Show last authors
1 With the support of the [[OpenPaaS::NG>>http://open-paas.org/]] research project, the [[XWiki Labs team>>https://labs.xwiki.com]] from [[XWikiSAS>>http://www.xwiki.com]] has worked a lot on improving the [[realtime collaboration>>https://labs.xwiki.com/xwiki/bin/view/Blog/Realtime+Collaboration]] features in XWiki. The realtime engine has evolved and can now be plugged in to many different content editors.
2
3 Thanks to the [[CKEditor integration>>http://extensions.xwiki.org/xwiki/bin/view/Extension/CKEditor+Integration]] application, there is now a famous and powerful tool in XWiki to write content using a visual editor, and this tool can be used for collaborative editing with the [[Realtime WYSIWYG>>extensions:Extension.RtWysiwyg]] extension. Here we are going to describe the features added by the realtime extension with its latest versions:
4 * A new lock message
5 * A realtime merging tool
6 * The macro editing
7 * The position of other users in the document (prototype, not released yet)
8
9 === Document Lock ===
10
11 If you are working in a wiki where realtime applications are installed, you may encounter a lock message in two different situations.
12
13 The first one is similar to the default XWiki lock, which is displayed when you want to edit a page while someone else is already editing it. With the realtime applications, if the other user has enabled the realtime collaboration, instead of being asked if you want to "force editing", you have the ability to join the realtime session:
14 {{image reference="lock.png"/}}
15
16 The other situation happens when you want to edit a page with a specific content editor (Wiki editor or WYSIWYG editor) while it is already being edited by another realtime content editor. In that situation, you can either join the existing realtime session, or create a new realtime session in the same document with the content editor of your choice:
17 {{image reference="lock2.png"/}}
18
19 === Merging Content while Saving ===
20
21 We've just seen that it is now possible to create a new realtime session while there is an existing one in the same document but with another content editor. It is then possible to have some people using the realtime Wiki editor and the realtime Wysiwyg editor at the same time, and they won't have the same content. To avoid the loss of content for people using one of these editors, an automatic merging tool has been added in the realtime extensions.
22
23 * **If there isn't any conflict**, meaning that both realtime sessions are not trying to change the same parts of the document at the same time, the merge should happen automatically without losing any content.
24 * If there are conflicts (both sessions try to edit the same part of the document but with different content), you will have to choose, while saving the document, which content you want to keep: the current realtime content (your changes), or the remote content (the changes from the other realtime session) :
25
26 {{image reference="merge.png"/}}
27
28 {{warning}}
29 Although it is possible to have different realtime sessions (wiki, wysiwyg and forms) for a document at the same time, merge conflicts will result in a risk of losing the content for one part of the users. **Be careful** when you have two different realtime content editors at the same time in one document!
30 {{/warning}}
31
32 === Macro Editing (Experimental) ===
33
34 Beginning with CkEditor integration 1.7 and Realtime Wysiwyg 1.18, XWiki macros can be added or edited using CkEditor with realtime collaboration enabled. The realtime version is still in an experimental state, but it allows you to edit documents containing macros and edit the macros' content without corrupting the whole page.
35
36
37 === Users position (Early Prototype) ===
38
39 {{info}}
40 This is an early prototype of the feature, not released at the moment.
41 {{/info}}
42
43 In future versions, it will be possible to display the users' avatars in the left margin of the document, at the line where is located their cursor. Their avatar will also be displayed in the top bar instead of only their username. These elements will be configurable in the administration interface:
44 * In the margin, display / hide the avatars
45 * In the top bar, display only the username / only the avatars / both
46
47 Users with the default XWiki avatar will be displayed with a fake avatar representing the first character of their username, so that they are easily recognizable.
48
49 {{image reference="avatar.png" width="1000px"/}}
50
51
52
53 You can find known issues and add ideas/improvements on https://jira.xwiki.org/browse/RTWYSIWYG and the sources are available on [[https://github.com/xwiki-contrib/realtime-wysiwyg]].

Get Connected