npm.io
3.1.1 • Published 5 years ago

dropdeck_slate-yjs

Licence
MIT
Version
3.1.1
Deps
2
Size
172 kB
Vulns
0
Weekly
0
Stars
553

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.

Keywords