Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7923067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:10:58+00:00 2026-06-03T17:10:58+00:00

I want to make a chat program like Google Wave that shows what is

  • 0

I want to make a chat program like Google Wave that shows what is typed in real-time. For the moment I’m just using a textarea. I just want to know what change the user made to the textarea (either one character or pasted text) without having to perform a diff on the whole textarea. I was something along the lines of using a setTimeout with the oninput event but I believe this could only give me the “before text” and the “after text”. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T17:10:59+00:00Added an answer on June 3, 2026 at 5:10 pm

    this type of functionality is most likely accomplished using a message batching type setup.

    here’s how it would break down:

    1. attach event handlers to a text area to track modifications on the character level (think, keydown, keypress, keyup, etc..) and log these into a message buffer

    2. you’ll want to have a backup for “end transaction” type events like “onchange”, “onpaste”, etc.. that serve to check the integrity of you’re state and be prepared to run a “full re-sync” (eg. signal other clients to do a full “pull”) if you think you have a mismatch

    3. on an interval (every 0.3 – 1 second), you empty the message buffer and re-transmit the messages to other clients (direct connect [websockets?], or indirect via server)

    4. when a client receives messages, they process them in the same order they’ve received them [hopefully] ending up with the same state, error or conflict fallback: signal full sync

    5. on a full sync client should re-pull the full state and attempt to place the focus/carrot as close to the last position as possible

    on a side note: this is greatly simplified with a concept of “regions” where you can do clean full swaps on your region without affecting mine…

    hope this helps -ck

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a single page web app that shows real time data using just
I'm getting started with Google App Engine. I want to make AJAX chat like
I want to start to make a chat client that runs in web browsers,
I want to make a chat system using javascript.I dont want any existing application.I
I want to make a chat server by using .NET technology (C# and SQL
I want to make it so that in my chat-application, links to websites can
i want to make basic chat server using one of the event driven libarary
I want to make it that one user on the site can chat request
I am creating a program that displays a popup at certain times (just like
Just want to make sure I understand this correctly (I'd ask on SO Chat,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.