Skip to content
No description, website, or topics provided.
JavaScript HTML
Branch: master
Clone or download
Latest commit 8ea4301 Aug 31, 2019

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src update cursor after each edet and prevent errors from quill-cursor to… Jun 13, 2019
test fix testing with node Jun 12, 2019
.gitignore init 💥 Jun 12, 2019
LICENSE init 💥 Jun 12, 2019
README.md Update README.md Jun 13, 2019
package-lock.json 0.0.2 Jun 13, 2019
package.json update deps Aug 31, 2019
rollup.config.js Update Yjs dependency and fix lint/types Jun 13, 2019
test.html init 💥 Jun 12, 2019
tsconfig.json Update Yjs dependency and fix lint/types Jun 13, 2019

README.md

y-quill

Quill Editor binding for Yjs - Demo

This binding maps a Y.Text to a Quill instance. It optionally supports shared cursors via the quill-cursors module.

Example

import { QuillBinding } from 'y-quill'
import Quill from 'quill'
import QuillCursors from 'quill-cursors'

..

Quill.register('modules/cursors', QuillCursors)

const type = ydoc.getText('quill')

var editor = new Quill('#editor-container', {
  modules: {
    cursors: true,
    toolbar: [
      [{ header: [1, 2, false] }],
      ['bold', 'italic', 'underline'],
      ['image', 'code-block']
    ]
  },
  placeholder: 'Start collaborating...',
  theme: 'snow' // or 'bubble'
})

// Optionally specify an Awareness instance, if supported by the Provider
const binding = new QuillBinding(type, editor, provider.awareness)

/*
// Define user name and user name
// Check the quill-cursors package on how to change the way cursors are rendered
provider.awareness.setLocalStateField('user', {
  name: 'Typing Jimmy',
  color: 'blue'
})
*/

Also look here for a working example.

License

The MIT License © Kevin Jahns

You can’t perform that action at this time.