- JavaScript 59.1%
- CSS 37.5%
- HTML 3.4%
Realtime Editor
This is a fork of webxdc/editor that adds real-time functionality to allow online presence and fast text synchronization for a smoother multi-editor experience. Not all clients support the joinRealtimeChannel API and some peers might be offline, so this app addionally syncs content using the original sendUpdate method of syncing as well.
This app uses yjs, y-protocols/awareness.js, and prosemirror, along with a modified version of the y-webxdc provider to offer collaborative editing for webxdc-supporting messengers.
While this editor app can be productively used, it focuses on small code size and complexity, and does not aim to become a full-fledged editor. Little improvement PRs are welcome!
Trying the latest release
-
Download the latest
editor.xdcfrom release assets. -
Send a message into a group chat and attach the downloaded
editor.xdcrelease file. -
Anyone in the chat can now hit the "start" button and edit the chat-shared document.
Development
Install
npm install
Run
Run the app in the webxdc-dev tool:
npm start
Test
Run code-style checks with the following command (basically same as npm run check):
npm test
Build
To create a .xdc file that can be send to a chat in any Webxdc-capable app, execute:
npm run build
The resulting .xdc file is saved in the dist-release/ folder.
Then just send the file with a message to a chat and you are ready to go!
To build with Eruda debugger,
run ERUDA=1 npm run build.
Code Style
Code style is checked and fixed by eslint, run:
npm run check
npm run fix
to perform checks or apply suggested fixes.
Note that npm test will automatically check code style.
Release
With Forgejo Actions
- Simply push a tag.
Given that the Actions are properly set up, the workflow will run and publish a release. You can later edit the release.
Manually
-
Follow Building
-
Upload the
.xdcfile fromdist-release/. Make sure that the name of the file is the same as in the previous releases. -
Fill and submit the form.