1
3
Fork
You've already forked editor
0
forked from webxdc/editor
A webxdc app using yjs to enable collaborative editing in a WYSIWYG manner
  • JavaScript 59.1%
  • CSS 37.5%
  • HTML 3.4%
2024年12月06日 13:55:16 -05:00
.forgejo/workflows remove comment 2023年09月04日 19:06:43 +02:00
assets update readme to show how this fork is different 2024年11月18日 15:44:52 -05:00
css initial support for real time stuff 2024年11月06日 18:33:22 -05:00
public Optimize icon image 2024年12月06日 13:55:16 -05:00
src fix issue with document updates 2024年11月15日 13:23:53 -05:00
.eslintignore Add eslint as linter 2023年09月21日 22:47:51 +02:00
.eslintrc.js also integrate prefer-const, closes #69 2023年09月26日 12:52:00 +02:00
.gitignore use icon & move stuff to correct place 2022年05月12日 16:51:19 +02:00
index.html streamline index.html and import css there instead of in code 2023年09月27日 15:21:19 +02:00
LICENSE Initial commit 2022年05月05日 14:42:26 +02:00
package-lock.json add colors 2024年11月07日 09:49:02 -05:00
package.json add colors 2024年11月07日 09:49:02 -05:00
README.md update readme to show how this fork is different 2024年11月18日 15:44:52 -05:00
vite.config.js refactor: build: simplify Eruda inclusion logic 2023年09月19日 19:30:29 +04:00

Realtime Editor

Editor Screenshot

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

  1. Download the latest editor.xdc from release assets.

  2. Send a message into a group chat and attach the downloaded editor.xdc release file.

  3. 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

  1. 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

  1. Follow Building

  2. Go to https://codeberg.org/webxdc/editor/releases/new

  3. Upload the .xdc file from dist-release/. Make sure that the name of the file is the same as in the previous releases.

  4. Fill and submit the form.