多人协作指的是多个用户 同时 编辑同一个文档,可以相互看到对方的所有文档操作,包括编写、删除、修改文字内容、插入图片...等等操作。
同时可以看到其他用户的昵称、焦点所在位置等信息。
PS:此功能在 Pro 版本才有,开源版没有这个功能。 Pro 版预览地址:http://pro.aieditor.com.cn
new LinwitDocEditor({
element: "#aiEditor",
collaboration: {
url: "ws://127.0.0.1:8080?somekey=value",
documentName: "my document",
token: "your-token",
userName: "Michael Yang",
userColor: "#abcdef",
onAuthenticated: () => {
},
onAuthenticationFailed: (reason: string) => {
},
onUsersUpdate: (users: any[]) => {
},
},
})