implement some of the commented todos

This commit is contained in:
Kevin Jahns
2019-04-09 04:01:37 +02:00
parent 1b06f59d1c
commit 52ec698635
24 changed files with 233 additions and 243 deletions

View File

@@ -9,7 +9,7 @@ import 'codemirror/mode/javascript/javascript.js'
const provider = new WebsocketProvider(conf.serverAddress)
const ydocument = provider.get('codemirror')
const ytext = ydocument.define('codemirror', Y.Text)
const ytext = ydocument.getText('codemirror')
const editor = new CodeMirror(document.querySelector('#container'), {
mode: 'javascript',

View File

@@ -1,4 +1,3 @@
import * as Y from 'yjs'
import { WebsocketProvider } from 'y-websocket'
import { TextareaBinding } from 'y-textarea'
@@ -6,7 +5,7 @@ import * as conf from './exampleConfig.js'
const provider = new WebsocketProvider(conf.serverAddress)
const ydocument = provider.get('textarea')
const type = ydocument.define('textarea', Y.Text)
const type = ydocument.getText('textarea')
const textarea = document.querySelector('textarea')
const binding = new TextareaBinding(type, textarea)