Skip to content

Instantly share code, notes, and snippets.

View jvandenaardweg's full-sized avatar
🚀

Jordy van den Aardweg jvandenaardweg

🚀
View GitHub Profile
import {createEditor} from 'Lexical';
import {createBinding, syncYjsChangesToLexical} from 'LexicalYjs';
import {Doc, applyUpdate} from 'yjs';
export default function exportYDoc(
yDocState: Uint8Array,
nodes: Array<Class<LexicalNode>>,
): SerializedEditorState {
const emptyFunction = () => {};
"use strict";
import type { LexicalEditor, LexicalNode } from "Lexical";
import type { Binding, Provider } from "LexicalYjs";
import {
createBinding,
syncLexicalUpdateToYjs,
syncYjsChangesToLexical,
} from "LexicalYjs";