canvas-editor
canvas-editor copied to clipboard
多人协作
What problem does this feature solve?
编辑器能够增加多人协作的功能吗?
What does the proposed API look like?
编辑器能够增加多人协作的功能吗?
有在尝试,如: CRDT ,可以等后续更新
Hi, I wanted to make an observation, to make the websocket server work it was necessary to change this:
"CRDT": "HOST=localhost PORT=1234 node ./node_modules/y-websocket/bin/server.js npx y-websocket"
For this:
"CRDT": "npx y-websocket-server"
Inside package.json
I don't know if it is in all cases, but for me it worked this way.
Have you implemented the feature of multi person collaboration in the canvas-editor project? Is this the branch? 【feature/CRDT】
Hey @Hufe921 , I did some tests and implemented the multi-cursor functionality, where I would have the cursor that is the editor and it follows the rules that are in place today, being manipulated through keyboard and mouse events, etc.
And the rest are not handled by events but through api. Extra cursors can be registered and removed.
This functionality is interesting because it is possible for anyone who uses the editor to implement data synchronization with websocket or in whatever way they prefer, and work with the API for various cursors in the editor according to the users.
What do you think of this line of thought for this scenario? Would you be interested in a PR to review if you find it interesting?
Have you implemented the feature of multi person collaboration in the canvas-editor project? Is this the branch? 【feature/CRDT】
Yes, in this branch you can get a multi-collaboration implementation. As I mentioned in the comment above, in my case I needed to change the websocket configuration in package.json to get started.
But it's a simple implementation, it doesn't show who is editing, which parts are being edited, and when someone changes something there is a refresh in the editor, as if they were reloading the page.
But you can now get an idea of how to work with this option.