协同编辑
Collaborate
下面的编辑器与一个简单的服务端服务通信,以实现实时的协同编辑。连接到同一文档的每个人都会看到相同的文档,并且他们的更改会被发送给在该文档上工作的其他人。
The editor below talks to a simple server-side service to allow real-time collaborative editing. Everybody connected to a given document sees the same document, and has their changes sent over to other people working on the document.
这个演示还(粗略地)展示了如何用 ProseMirror 实现类似行外批注(out-of-line annotations)的功能。如果你选中文本并点击菜单中的气泡图标,就会提示你输入一个批注。这些批注会同步给其他用户,并显示为黄色背景的文本。把光标放到一个批注里,就能看到它的内容。
The demo also (crudely) shows how ProseMirror can be used to implement something like out-of-line annotations. If you select text and click the speech bubble icon in the menu, you'll be prompted to enter an annotation. These are synced to other users and show up as text with yellow background. Put the cursor in an annotation to see what it says.
声明:由于这个演示对所有人开放,你可能会遇到有人输入愚蠢、刻薄和令人反感的内容。因为我无法对此进行管理,建议你直接按删除键。
Disclaimer: Since this demo is open for everybody, you might run into people typing stupid, mean, and disgusting things. Since I'm not going to be able to moderate this, I recommend just hitting delete.