Files
yjs/examples/html-editor/index.js

18 lines
431 B
JavaScript
Raw Normal View History

2017-08-25 20:35:06 +02:00
/* global Y */
// initialize a shared object. This function call returns a promise!
let y = new Y({
2017-08-25 20:35:06 +02:00
connector: {
name: 'websockets-client',
2017-09-29 22:33:28 +02:00
url: 'http://127.0.0.1:1234',
2017-10-02 15:50:56 +02:00
room: 'html-editor-example6'
// maxBufferLength: 100
2017-08-25 20:35:06 +02:00
}
})
window.yXml = y
window.onload = function () {
console.log('start!')
// Bind children of XmlFragment to the document.body
y.get('xml', Y.XmlFragment).bindToDom(document.body)
}