joemccann/dillinger — pull request #206 by johntyree (2014-06-14 07:16:47+00:00)
Title: Allowing toggling of collab feature (default off)

This should be pretty straight forward. Workflow as follows...

- At page load, we are *not* collaborating.
- Clicking `collaborate` connects to the current ShareJS document and turns the little heart icon to white.
- If that document already has text, we overwrite our editor contents with it. Otherwise we insert our editor contents into it.
- We collaboratively edit the document.
- Clicking `collaborate` again disconnects from the ShareJS document, preserving the editor contents and turning the heart back to black.
- Further edits are not shared and we're back at step one.
- Clicking `collaborate` *again* will overwrite any changes we made since we were last connected unless someone else has emptied the document.

Coming up with a good way to sync would be pretty nice but I don't see how and I think it's out of scope. We're not trying to implement `git` here...