https://github.com/lucafabbian/codemirror6-firepad-demo
Demo on codemirror 6 + Firepad
https://github.com/lucafabbian/codemirror6-firepad-demo
Last synced: 2 months ago
JSON representation
Demo on codemirror 6 + Firepad
- Host: GitHub
- URL: https://github.com/lucafabbian/codemirror6-firepad-demo
- Owner: lucafabbian
- Created: 2022-06-11T10:51:07.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-11T13:06:11.000Z (about 3 years ago)
- Last Synced: 2025-03-24T12:46:57.976Z (3 months ago)
- Language: JavaScript
- Size: 1.35 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Codemirror6 + Firepad
Demo of Codemirror6 using the Google Firebase service to achieve real time collaboration with minimal setup.
In the `index.html` you will find two editable areas. The first one is powered by the traditional ACE Editor, while the second one is powered by Codemirror6. Editing one should result in the changes synced to the other. Enjoy!

## Getting started
First, make sure to get a Firebase Key. It's free up to 1GB of stored data, you just have to sign in with your Google account [here](https://firebase.google.com/). If you find yourself in trouble, you may also want to check a tutorial I wrote for another project [here](https://librogamesland.github.io/magebook/#/?id=collaborative-projects).
Setup the demo:
```bash
git clone https://github.com/lucafabbian/codemirror6-firepad-demo.git
cd codemirror6-firepad-demo# Setup firebase. Need to export before build.
# REPLACE WITH YOUR OWN KEYS - must be a valid json
export FIREBASE_CONFIG='{
"apiKey": "AHdS3A657ufbgfnhnhH8wtXGCzPFqBWYccsdfdfXSas",
"databaseURL": "https://my-database-default-rtdb.europe-west1.firebasedatabase.app"
}'
npm run build
npm run serve```
Done! Now just open [http://127.0.0.1:20124/](http://127.0.0.1:20124/)