2018-01-25 17:28:33 -07:00

18 lines
373 B
JavaScript

/* global Y */
let y = new Y('textarea-example', {
connector: {
name: 'websockets-client',
url: 'http://127.0.0.1:1234'
}
})
window.yTextarea = y
// bind the textarea to a shared text element
let type = y.define('textarea', Y.Text)
let textarea = document.getElementById('textfield')
let binding = new Y.TextareaBinding(type, textarea)
// binding.destroy()