fix examples for Yjs@13
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
</head>
|
||||
<script src="../yjs-dist.js"></script>
|
||||
<script src="../../y.js"></script>
|
||||
<script src='../../../y-websockets-client/y-websockets-client.js'></script>
|
||||
<script src="./index.js"></script>
|
||||
</head>
|
||||
<body contenteditable="true">
|
||||
|
||||
@@ -4,18 +4,14 @@ window.onload = function () {
|
||||
window.yXmlType.bindToDom(document.body)
|
||||
}
|
||||
|
||||
const persistence = new Y.IndexedDB()
|
||||
|
||||
// initialize a shared object. This function call returns a promise!
|
||||
let y = new Y('htmleditor', {
|
||||
connector: {
|
||||
name: 'websockets-client',
|
||||
url: 'http://127.0.0.1:1234',
|
||||
room: 'html-editor'
|
||||
// maxBufferLength: 100
|
||||
url: 'http://127.0.0.1:1234'
|
||||
}
|
||||
}, persistence)
|
||||
window.yXml = y
|
||||
})
|
||||
|
||||
window.y = y
|
||||
window.yXmlType = y.define('xml', Y.XmlFragment)
|
||||
window.undoManager = new Y.utils.UndoManager(window.yXmlType, {
|
||||
captureTimeout: 500
|
||||
|
||||
Reference in New Issue
Block a user