Package Exports
- y-richtext
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (y-richtext) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Rich Text type for Yjs
Use it!
Retrieve y-richtext and Quill Editor with bower
bower install y-richtext quill --saveYou can bind the richtext type to any Quill instance. Look on their homepage on how to extend Quill.
Example
Y({
db: {
name: 'memory'
},
connector: {
name: 'websockets-client',
room: 'richtext-example18',
debug: true
//url: 'http://127.0.0.1:1234'
},
sourceDir: '/bower_components',
share: {
richtext: 'Richtext' // y.share.richtext is of type Y.Richtext
}
}).then(function (y) {
window.yquill = y
// create quill element
window.quill = new Quill('#editor', {
modules: {
'toolbar': { container: '#toolbar' },
'link-tooltip': true
},
theme: 'snow'
})
// bind quill to richtext type
y.share.richtext.bind(window.quill)
})RichText Object
Reference
- .bind(editor)
- 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
Contribution
We thank Veeting and Linagora who sponsored this work, and agreed to publish it as Open Source.
License
Yjs and the RichText type are licensed under the MIT License.
- Corentin Cadiou corentin.cadiou@linagora.com
- Kevin Jahns kevin.jahns@rwth-aachen.de