From c663230c1b6ec3f5f66f44d18c952509e5416302 Mon Sep 17 00:00:00 2001 From: DadaMonad Date: Thu, 26 Feb 2015 21:39:12 +0000 Subject: [PATCH] add xml examples --- examples/HTML/index.html | 19 +++++++++++++++++++ examples/HTML/index.js | 26 ++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 examples/HTML/index.html create mode 100644 examples/HTML/index.js diff --git a/examples/HTML/index.html b/examples/HTML/index.html new file mode 100644 index 00000000..de0fb083 --- /dev/null +++ b/examples/HTML/index.html @@ -0,0 +1,19 @@ + + + + + Y Example + + + + + + +

yjs HTML

+

Collaborative editing on HTML with yjs +and XMPP Connector.

+ +

yjs is a Framework for Real-Time collaboration on arbitrary data types. +

+ + diff --git a/examples/HTML/index.js b/examples/HTML/index.js new file mode 100644 index 00000000..1c5016e5 --- /dev/null +++ b/examples/HTML/index.js @@ -0,0 +1,26 @@ + + +connector = new Y.XMPP().join("testy-xmpp-json3", {syncMode: "syncAll"}); +connector.debug = true + +y = new Y(connector); + +window.onload = function(){ + var textbox = document.getElementById("textfield"); + y.observe(function(events){ + for(var i=0; i