Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send document identifier when emitting doc #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

snikch
Copy link

@snikch snikch commented Jul 8, 2013

Fixes issue when a client is editing multiple documents. The doc command had no awareness of which doc it had successfully connected to.

Mal Curtis added 2 commits July 8, 2013 12:29
Fixes issue when a client is editing multiple documents. The `doc` command had no awareness of which doc it had successfully connected to.
@bjorno43
Copy link

bjorno43 commented Jan 8, 2021

@snikch I know this commit of yours is like really old, but I've been updating it along with updates to CM5 and adding a bunch of parts that you missed in your PR. Got it all working now, except one thing I somehow can't figure out myself. How to actually initiate multiple documents at the same time? Could you perhaps enlighten me on this?

You can check the work I've done so far yourself here: https://github.com/bjorno43/ot.js-multi-docs So far it works for text operations, but not for mouse positions and no idea yet how to implement 2 codemirror docs on the same page for example.

Update: Got it fully working. Still wish to find a way to have multiple CodeMirror instances on a single page, but at least for now it can initialize documents based on a URL parameter. As long as users use the same URL, they get the same document.

@snikch
Copy link
Author

snikch commented Jan 9, 2021

@bjorno43 oh man, this is such a long time ago I would literally have to start from scratch figuring out what I was talking about sorry. Glad you got working 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants