dropdeck_slate-yjs
TypeScript icon, indicating that this package has built-in type declarations

3.1.1 • Public • Published

Slate Yjs

Fork of the slate-yjs project, adding an optional normalizeRemoteEvents: (editor, fn) option to the withYjs plugin, to allow for custom handling of remote events, applied to the shared type. Specifically, this can be used to avoid remote events ending up in the editor's history; for example:

withYjs(
  editor,
    sharedType, {
      // Remote events should clear the history stack!
      normalizeRemoteEvents: (editor, fn) => {
        HistoryEditor.withoutSaving(baseEditor, fn);            
      }
    }
);

Depends on the resolution of this issue.

Package Sidebar

Install

npm i dropdeck_slate-yjs

Weekly Downloads

0

Version

3.1.1

License

MIT

Unpacked Size

176 kB

Total Files

111

Last publish

Collaborators

  • bjarkih