Files
marqdo/examples/web-collab-doc/index.mq.md
T

1.0 KiB

markup, title, description, import
markup title description import
occlusion web-collab-doc Two-browser collaborative plain-text editor over WS room (LWW snapshot sync)
web
ext/web/web.mq.md

main

Collaborative notepad: open the page in two browsers; edits fan out via /live/{room} WebSocket (mode=room + presence). Build WASM first:

marqdo wasm build -o examples/web-collab-doc/static

embed = > web.client_embed bridge="/static/marqdo-bridge.js" wasm="/static/marqdo_wasm.wasm" source="/static/client.mq.md" boot=True

intro = "

Room demo · open twice to co-edit.

presence: —

" + embed

page = > web.page title="Collab doc" intro=intro layout="bare" app = > web.app page=page host="127.0.0.1" port=18094 app = > app.static dir="static" mount="/static" app = > app.route_ws path="/live/{id}" mode="room" room_key="doc.{id}" presence=True

app.listen