update docs for consistency

This commit is contained in:
Kevin Jahns 2016-08-29 17:25:54 +02:00
parent bc0dd6c04e
commit ff939f1243

View file

@ -8,10 +8,10 @@ It propagates document updates directly to all users via WebRTC. While WebRTC is
* Not suited for a large amount of collaborators * Not suited for a large amount of collaborators
* WebRTC is not supported in all browsers, and some have troubles communicating with each other * WebRTC is not supported in all browsers, and some have troubles communicating with each other
We provide you with a free signaling server (it is used by default), but in production you should set up your own signaling server. You could use the [signalmaster](https://github.com/andyet/signalmaster) from &yet, which is very easy to set up. We provide you with a free signaling server (it is used by default), but in production you should set up your own signaling server. You could use the [signalmaster](https://github.com/DadaMonad/signalmaster) from &yet, which is very easy to set up.
## Use it! ## Use it!
Retrieve this with bower or npm, and use it as a js library or as a custom polymer element. Retrieve this with bower or npm.
##### NPM ##### NPM
``` ```
@ -34,14 +34,13 @@ Y({
name: 'memory' name: 'memory'
}, },
connector: { connector: {
name: 'webrtc', // choose the webrtc connector name: 'webrtc', // use the webrtc connector
room: 'Textarea-example-dev' room: 'Textarea-example-dev'
}, },
sourceDir: '/bower_components', // location of the y-* modules sourceDir: '/bower_components', // location of the y-* modules
share: { share: {
textarea: 'Text' // y.share.textarea is of type Y.Text textarea: 'Text' // y.share.textarea is of type Y.Text
} }
// types: ['Richtext', 'Array'] // optional list of types you want to import
}).then(function (y) { }).then(function (y) {
// bind the textarea to a shared text element // bind the textarea to a shared text element
y.share.textarea.bind(document.getElementById('textfield')) y.share.textarea.bind(document.getElementById('textfield'))