One of the main reason we had to roll back from Codemirror6 was the lack of a simple real time collaboration plugin. A real pity, since the alternatives were missing many Codemirror6 features. That’s why I decided to port the Firepad library to Codemirror6.
This allows real time collaboration without setting up a server. You just have to get a key with your Google account (the free Firebase tier is up to 1GB of storage).
Google discontinued the firepad project some years ago, so I had to do a major rewrite. Now it’s published under the @lucafabbian/firepad package.
It’s still an early version: it’s lacking some features, and tests are completely broken. But it works.
WARNING:You are exposing your API Key inside your GitHub project readme within the example code listed there. Unless you simply fabricated a bogus one. But from initial appearances, it looks like a valid API Key. You never should expose your credentials inside a public GitHub repository. You should include credentials and other secrets like that in something like a dot env file that is also listed in your dot gitignore file.
Hopefully, you will see this message and change that.
That’s a nice demo! I remember trying to do something similar in the past, then realizing that cm6 has its own collab plugin. But I guess if the original firepad OTs work with cm6 there is the advantage of interop with other editors.