Real-time Editing
Co-edit documents simultaneously with conflict-free synchronization powered by Yjs CRDT.
Omnilib uses Yjs CRDT (Conflict-free Replicated Data Type) technology to let multiple people edit the same document at the same time. Every change merges automatically — no conflicts, no overwritten work.
How it works
When you and a collaborator both have the same file open, Omnilib connects you through a real-time sync layer built on Convex and PowerSync. Your edits propagate instantly to everyone connected to the project. Because Yjs uses CRDTs, the algorithm mathematically guarantees that all clients converge to the same document state, even when edits happen simultaneously.
Local edits are never overwritten by remote changes. If you and a collaborator both edit the same paragraph at the same moment, Yjs merges both changes without losing either. The merge always prefers the most recent operation at the character level, so the result is predictable and lossless.
Supported editors
Real-time co-editing is available in the Markdown editor when you are in live preview mode. Switch to live preview by clicking the preview toggle in the editor toolbar.
Code files and other file types sync changes whenever you save, but do not support character-level real-time collaboration.
Setting up co-editing
Real-time editing requires the project to be shared with at least one other person. Set up sharing first:
- Click Share in the top toolbar.
- Invite collaborators by email and assign their roles.
- Once they accept the invitation and open the same file, real-time sync activates automatically.
See Project Sharing for full instructions.
What you see while collaborating
When collaborators are active in the same file you will see:
- Live cursors — colored cursors showing where each person is typing (see Live Presence)
- Presence avatars — profile pictures in the toolbar indicating who is online
- Instant updates — their keystrokes appear in your editor within milliseconds
There is no manual merge step. Changes from all connected users appear as they type.
Connectivity and offline edits
If your connection drops, Omnilib queues your local edits. When you reconnect, your changes sync automatically. Because the CRDT algorithm is designed to handle out-of-order delivery, re-syncing after a disconnection never causes data loss or conflicts.
Note: During offline periods, you continue editing locally. Your collaborators will not see your changes until you reconnect, but nothing is lost.
Performance
Real-time sync is optimized for documents up to several hundred kilobytes. Very large Markdown files (above a few megabytes) may experience slight propagation delays, but correctness is never compromised.