How to create a real-time text editor (multi-user) in ajax

I need to create an Ajax based text editor. Specifications are as follows:

• User logs on to the website

• The user sees a list of registered users

• The user selects one of the registered users, say B, if user B is available (without exchanging data with any other user), he receives a connection request. If user B accepts the request, both users are connected.

• Once users are connected, they exchange a text editor. If user A types something into the text editor available on his screen, the same text becomes visible on the screen of user Bs in the same coordinates. Similarly, if user B enters something or deletes something from the text editor on his screen, then this happens on the screen of user As.

• Create pointer-shaped images on both user screens to display mouse pointers. When user A moves the mouse cursor, the image on the screen of user Bs should move in accordance with the movement of the user. Like a mouse, and similarly, when user B moves his mouse, the image on the screen of user As should be moved accordingly.

Can someone help me?

+3
source share
1 answer

If you can use ASP.NET, see SignalR . Its JavaScript / C # library, which allows you to easily translate and invoke JavaScript on multiple web clients. You can literally accomplish a lot of what you want to do quite easily and without a database.

+1
source

Source: https://habr.com/ru/post/1768605/


All Articles