开发者

how to create real-time collaborative (multi-user) text editor in ajax

I have to to create an Ajax based live text editor. The specifications are following;

• User logs in on the website

• User sees the list of logged in users

• User selects one of the logged in users let’s say B, if the user B is available (not communicating with any other user), it gets a connection request. If user B accepts the request, both users are connected.

• Once the users are connected, they share text editor. If user A enters anything on the text edito开发者_C百科r available on his screen, the same text is made visible on user B’s screen at the same coordinates. Similarly, if user B enters anything or removes anything from the text editor on his screen, the same happens on user A’s screen.

• Create pointer shaped images on both user’s screens to represent mouse pointers. When user A moves his mouse pointer, the image on user B’s screen should be moved according to the movement of user A’s mouse and similarly, when user B moves his mouse, the image on user A’s screen should be moved accordingly.

Can anybody help me??


If you can use ASP.NET take a look at SignalR. Its a JavaScript/C# library that allows you to easily broadcast to and invoke JavaScript on multiple web clients. You can literally accomplish a lot of what you want to do pretty easily and without a database.


Can you use Node js socket connection for achieving real time collaboration.

Editor event can be available for current mouse position. Previous element sibling event can be used for finding where the users has inserted his content exactly. This need to be transferred to the other user and populate the data on his editor at the exact position rather than replacing his content.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜