The fabolous feature of y-richtext is that you can bind it to a Quill instance (> v1.0.0) in order to enable collaborative richtext editing.
Retrieve y-richtext and Quill Editor with bower.
bower install y-richtext quill --save
npm install y-richtext y-array quill --save
This type depends on y-array. So you have to extend Yjs in the right order:
var Y =YY
- Bind this type to an rich text editor. (Currently, only QuillJs is supported)
.bind(editor)does not preserve the existing value of the bound editor
- Explicitely bind a Quill editor
- Remove binding
- Remove all quill bindings
- .insert(position, string)
- Insert text at a position
- .delete(position, length)
- Delete text
- select(from, to, attrName, attrValue)
- Assign meaning to a selection of text (application depending to what you bind, this can assign text to be bold, italic, ..). Set null to remove selection.
- Get the string representation of this type (without selections)
- Convert internal structure to a Quill delta http://quilljs.com/docs/deltas/
- Apply a Quill delta http://quilljs.com/docs/deltas/
We thank Linagora who sponsored this work, and agreed to publish it as Open Source.
- support for Quill@^1.0.0-rc.2
- relies on Yjs@^12.0.0
Yjs and the RichText type are licensed under the MIT License.