Operation of an Online Text Editor

Asked

Viewed 77 times

3

Guys, could somebody give me a hand.

I have a question about how is saved the data of an online text editor in the google Docs style, there happens automatically, but the question for me is, how ? via API ? something like Socket.io ? I’m having a hard time understanding how this happens, how the data is sent to the server, someone can help me ?

I wonder, a person goes there and writes three pages, but after continuing to write after the third page, how do I save only the modified content ? or I’ll always have to save everything ?

  • Look, it’s a good question. But have you ever tried to open the Chrome console on this page and track the POST requests that are sent? In them you can remove all your doubts.

  • 1

    I hadn’t thought about it Diego, I’m sure I’ll try.

  • Good! Then share with us your findings... :)

  • I believe the events are in onChange respecting any rule, such as waiting a few seconds since the last change. The way if by API, Socket or etc surely depends on the tool, does not mean that Google, Microsoft or Voce should do the same.

  • Guys I’ve been analyzing a site with a functionality of this type, this site in question uses API, and whenever it checks changes it runs a PUT with all the text, it does not check if it hears changes or something like, it just sends everything, ALWAYS ! and it does not get bad, because it is sent only text, of course depending on the content the action 'SAVE' takes a while, but nothing that affects the usability of the tool, but I will still research more

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.