Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddbe19d78e | ||
|
|
f9a9edcc26 | ||
|
|
4340f028b5 |
@@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css" media="screen">
|
||||
#editor {
|
||||
#ace {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
@@ -13,7 +13,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="editor"></div>
|
||||
<div id="ace"></div>
|
||||
<script src="../bower_components/yjs/y.es6"></script>
|
||||
<script src="../bower_components/ace-builds/src/ace.js"></script>
|
||||
|
||||
|
||||
@@ -7,22 +7,19 @@ Y({
|
||||
},
|
||||
connector: {
|
||||
name: 'websockets-client',
|
||||
room: 'ace-example-dev'
|
||||
// debug: true
|
||||
// url: 'http://127.0.0.1:2345'
|
||||
room: 'ace-example'
|
||||
},
|
||||
sourceDir: '/bower_components',
|
||||
share: {
|
||||
ace: 'Text' // y.share.textarea is of type Y.Text
|
||||
}
|
||||
}).then(function (y) {
|
||||
window.y = y
|
||||
window.yAce = y
|
||||
|
||||
// bind the textarea to a shared text element
|
||||
var editor = ace.edit('editor')
|
||||
editor.setTheme('ace/theme/monokai')
|
||||
var editor = ace.edit('ace')
|
||||
editor.setTheme('ace/theme/chrome')
|
||||
editor.getSession().setMode('ace/mode/javascript')
|
||||
|
||||
y.share.ace.bindAce(editor)
|
||||
// thats it..
|
||||
})
|
||||
|
||||
@@ -9,15 +9,13 @@ Y({
|
||||
connector: {
|
||||
name: 'websockets-client',
|
||||
room: 'chat-example'
|
||||
// debug: true,
|
||||
// url: 'http://127.0.0.1:2345'
|
||||
},
|
||||
sourceDir: '/bower_components',
|
||||
share: {
|
||||
chat: 'Array'
|
||||
}
|
||||
}).then(function (y) {
|
||||
window.y = y
|
||||
window.yChat = y
|
||||
// This functions inserts a message at the specified position in the DOM
|
||||
function appendMessage(message, position) {
|
||||
var p = document.createElement('p')
|
||||
|
||||
@@ -8,9 +8,7 @@ Y({
|
||||
},
|
||||
connector: {
|
||||
name: 'websockets-client',
|
||||
room: 'Puzzle-example2'
|
||||
// debug: true,
|
||||
// url: 'http://127.0.0.1:2345'
|
||||
room: 'Puzzle-example'
|
||||
},
|
||||
sourceDir: '/bower_components',
|
||||
share: {
|
||||
@@ -20,6 +18,7 @@ Y({
|
||||
piece4: 'Map'
|
||||
}
|
||||
}).then(function (y) {
|
||||
window.yJigsaw = y
|
||||
var origin // mouse start position - translation of piece
|
||||
var drag = d3.behavior.drag()
|
||||
.on('dragstart', function (params) {
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
|
||||
Y({
|
||||
db: {
|
||||
name: 'indexeddb',
|
||||
idbVersion: 20
|
||||
name: 'memory'
|
||||
},
|
||||
connector: {
|
||||
name: 'websockets-client',
|
||||
room: 'richtext-example24',
|
||||
room: 'richtext-example',
|
||||
debug: true
|
||||
// url: 'http://127.0.0.1:1234'
|
||||
},
|
||||
@@ -18,7 +17,7 @@ Y({
|
||||
richtext: 'Richtext' // y.share.richtext is of type Y.Richtext
|
||||
}
|
||||
}).then(function (y) {
|
||||
window.yquill = y
|
||||
window.yQuill = y
|
||||
|
||||
// create quill element
|
||||
window.quill = new Quill('#editor', {
|
||||
|
||||
@@ -7,16 +7,14 @@ Y({
|
||||
},
|
||||
connector: {
|
||||
name: 'websockets-client',
|
||||
room: 'Textarea-example-dev'
|
||||
// debug: true
|
||||
// url: 'http://127.0.0.1:2345'
|
||||
room: 'Textarea-example'
|
||||
},
|
||||
sourceDir: '/bower_components',
|
||||
share: {
|
||||
textarea: 'Text' // y.share.textarea is of type Y.Text
|
||||
}
|
||||
}).then(function (y) {
|
||||
window.y = y
|
||||
window.yTextarea = y
|
||||
|
||||
// bind the textarea to a shared text element
|
||||
y.share.textarea.bind(document.getElementById('textfield'))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yjs",
|
||||
"version": "0.8.12",
|
||||
"version": "0.8.14",
|
||||
"homepage": "y-js.org",
|
||||
"authors": [
|
||||
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
|
||||
|
||||
Reference in New Issue
Block a user