背景
问题
大多数 Markdown 编辑器都默认联网且单人使用。M4rkdown 想探索一个离线优先、并且能邀请他人加入的编辑器会是什么体验。
方法
方案
以 CodeMirror 作为编辑核心,封装在 Preact + Vite 的 PWA 中,使用 PartyKit 实现实时协作,并在同一套同步引擎之上加入了趣味的多人打字模式。
功能
- Offline-first writing that syncs on reconnect
- Live collaborative editing
- Installable PWA
- Multiplayer typing arena
架构笔记
- CodeMirror handles the editing model; PartyKit carries collaborative state.
- Service-worker caching keeps the editor usable with no network.
挑战
结果
A deployed offline-first editor that doubles as a multiplayer writing surface and a typing game.
学到的东西
复盘
- 01Offline-first changes every assumption about state and conflict resolution.
- 02A small playful mode makes a utility memorable.
下一步
下一步
- 01Add document history
- 02Expand export formats
- 03Polish conflict resolution