The RCWeb Notepad App (app/notepad) is a massively simplified, real-time shared text editor. Engineered on the Symmetric Pattern, it enforces peer-to-peer data syncing so any participant in a virtual room can collaborate on a single plain-text document.


The application script.js relies strictly on raw HTML <textarea> polling paired with debounced RCWeb string payloads.
input event (addEventListener("input", maybeSendNotes)). When triggered, it grabs the raw value of the textarea, escapes newline (\n) and quote markers (\'), and forcefully builds an rc.send proxy transmission designed to execute notepad.updateNotes indiscriminately on all active peers in the session.maybeSendNotes mechanism uses window.setTimeout(sendNotes, 50) to coalesce and debounce multiple keystrokes hit within 50 milliseconds into a single decisive network operation block.rc.onUpdateNetworkStatus; upon full connection, fires notepad.requestRefresh(). Remote clients counter this by running notepad.refresh(), forcing out a debounced notepad.sendNotes() response back to the newly attached device so there are no disparate text states across peers.