All Projects → BitPhinix → Slate Yjs

BitPhinix / Slate Yjs

Licence: mit
Yjs bindings for Slate

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Slate Yjs

Slate Collaborative
slatejs collaborative plugin & microservice https://slate-collaborative.herokuapp.com/
Stars: ✭ 236 (+138.38%)
Mutual labels:  collaborative-editing, slate
Cause
An EDN-like CRDT (Causal Tree) for Clojure & ClojureScript that automatically tracks history and resolves conflicts.
Stars: ✭ 68 (-31.31%)
Mutual labels:  collaborative-editing
Slate Plugins
🔌 Next-gen slate plugins
Stars: ✭ 399 (+303.03%)
Mutual labels:  slate
Slate
Beautiful static documentation for your API
Stars: ✭ 33,447 (+33684.85%)
Mutual labels:  slate
Evervim
A Modern, Powerful & Modular Vim Distribution
Stars: ✭ 568 (+473.74%)
Mutual labels:  collaborative-editing
Mopaint
🎨💪 Modern, modular paint and more! (pre-alpha, not much done yet)
Stars: ✭ 50 (-49.49%)
Mutual labels:  collaborative-editing
Re Editor
一个开箱即用的React富文本编辑器 🚀re-editor
Stars: ✭ 367 (+270.71%)
Mutual labels:  slate
Slate
Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes.
Stars: ✭ 1,272 (+1184.85%)
Mutual labels:  slate
Asblocks
Share content as blocks
Stars: ✭ 70 (-29.29%)
Mutual labels:  collaborative-editing
Slate Sticky Inlines
A Slate plugin that makes it possible to edit the edges of Inlines.
Stars: ✭ 20 (-79.8%)
Mutual labels:  slate
Slate
🌌 A new, strongly-typed, fast, and secure programming language made for WebAssembly.
Stars: ✭ 15 (-84.85%)
Mutual labels:  slate
Teletype Crdt
String-wise sequence CRDT powering peer-to-peer collaborative editing in Teletype for Atom.
Stars: ✭ 637 (+543.43%)
Mutual labels:  collaborative-editing
Canner Slate Editor
📝Rich Text / WYSIWYG Editor built for Modularity and Extensibility.
Stars: ✭ 1,071 (+981.82%)
Mutual labels:  slate
Slate
A completely customizable framework for building rich text editors. (Currently in beta.)
Stars: ✭ 23,104 (+23237.37%)
Mutual labels:  slate
Pade
Pàdé (Yoruba word for Meet) is a browser extension (Chrome/Edge) based unified communications desktop client for Openfire.
Stars: ✭ 72 (-27.27%)
Mutual labels:  collaborative-editing
Slate
WIP - An open source Filecoin storage and retrieval client that makes it easy to collect, organize, and share data anywhere.
Stars: ✭ 383 (+286.87%)
Mutual labels:  slate
Widdershins
OpenAPI / Swagger, AsyncAPI & Semoasa definitions to (re)Slate compatible markdown
Stars: ✭ 856 (+764.65%)
Mutual labels:  slate
Slate Edit Code
A Slate plugin for code block editing
Stars: ✭ 44 (-55.56%)
Mutual labels:  slate
Slate Edit Table
Slate plugin for table edition
Stars: ✭ 97 (-2.02%)
Mutual labels:  slate
Subethaedit
General purpose plain text editor for macOS. Widely known for its live collaboration feature.
Stars: ✭ 1,183 (+1094.95%)
Mutual labels:  collaborative-editing

Slate Yjs - Live Demo

codecov Maintenance Commitizen friendly Downloads npm tests semantic-release

Yjs bindings for Slate.

Heavily inspired by slate-collaborative

Installation

Via npm:

npm install slate-yjs

Via yarn:

yarn add slate-yjs

Why use slate-yjs over slate-collaborative?

Performance. slate-collaborative works well for small documents but can cause 20 seconds + load times on heavier ones which slate-yjs can load in a fraction of a second.

For a more in-depth comparison take a look at these benchmarks

You might also want to take a look at "CRDTs are the future" from the creator of sharedb

API

YjsEditor

Adding a 2-way binding from the editor to a Yjs document is as easy as:

import { withYjs, SyncElement } from 'slate-yjs';
import * as Y from 'yjs';

const doc = new Y.Doc();
const sharedType = doc.getArray<SyncElement>('content');
const yjsEditor = withYjs(editor, sharedType);

Cursors

Slate-yjs support syncing collaborative cursors using awareness:

import { withCursor, useCursors } from 'slate-yjs';

// Adds (and syncs) cursor information (anchor, focus) to the awareness local state.
const cursorEditor = withCursor(yjsEditor, provider.awareness);

// Returns a decorator that annotates text nodes with cursor information and
// a array containing all cursor information.
const { decorate, cursors } = useCursors(cursorEditor);

Example project

Take a look at the example project here

Contribute

Please refer to each project's style and contribution guidelines for submitting patches and additions. In general, we follow the "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your machine
  3. Commit changes to your branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].