Skip to content
ProseMirror Binding for Yjs (v13)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.gitignore
LICENSE
README.md
package-lock.json
package.json
rollup.config.js
test.html
tsconfig.json

README.md

y-prosemirror

ProseMirror Binding for Yjs - Demo

This binding maps a YXmlFragment to a ProseMirror model.

Features

  • Shared Cursors
  • Successfully recovers when concurrents edit result in an invalid document schema

Example

import { prosemirrorPlugin, cursorPlugin } from 'y-prosemirror'

..

const type = ydocument.get('prosemirror', Y.XmlFragment)

const prosemirrorView = new EditorView(document.querySelector('#editor'), {
  state: EditorState.create({
    schema,
    plugins: exampleSetup({ schema }).concat([prosemirrorPlugin(type), cursorPlugin])
  })
})

Also look here for a working example.

License

The MIT License © Kevin Jahns

You can’t perform that action at this time.