<!DOCTYPE html>
<html>
  <head lang="en">
    <meta charset="UTF-8">
    <title>Yjs test</title>
    <script src="./y.js"></script>
    <script src="./y-webrtc.js"></script>
    <script src="./y-list.js"></script>
    <script src="./y-xml.js"></script>
    <script src="./config.js"></script>
    <script src="//tinymce.cachefly.net/4.1/tinymce.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
  </head>
  <body>
    <label for="B">Is it working for you? If not, send me a mail
      (<a href="mailto:corentin.cadiou@linagora.com?Subject=Bug%20in%20P2P%20real-time%20text%20editor">@ccadiou</a>)</label>
    <textarea id="content"></textarea>
    <div id="output"></div>
    <script>
     var connector = new Y.WebRTC("test", {url: config.server});
     console.log(config);
     console.log(connector);

     var connection = new Y(connector);

     connector.whenSynced(function() {
       if (connection.val("textarea") == null) {
	 connection.val("textarea", "", "mutable");
       }
       connection.val("textarea").bind(document.querySelector("#content"));
     });
     

     // Set up TinyMCE
     var keypress = function(event) {
       $('#output').html(tinyMCE.activeEditor.getContent());
     }
     tinymce.init({selector: 'textarea',
		   setup: function (ed) {
	 ed.on('keypress', keypress);
       }});
    </script>
  </body>
</html>

<!DOCTYPE html>
<html>
  <head lang="en">
    <meta charset="UTF-8">
    <title>Yjs test</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script src="bower_components/webcomponentsjs/webcomponents.js"></script>
    <script src="bower_components/yjs/y.js"></script>
    <script src="bower_components/yjs/y-object.js"></script>
    <script src="bower_components/y-list/y-list.js"></script>
    <script src="bower_components/y-xml/y-xml.js"></script>
    <script src="bower_components/y-webrtc/y-webrtc.js"></script>
    <script src="./config.js"></script>
  </head>
  <body>
    <p id="test">Default text</p>
    <script>
     var connector = new Y.WebRTC("test", {url: config.server});

     var y = new Y(connector);
     var p = document.getElementById("test");
     var yxml = new Y.Xml(p);

     y.val("xml", yxml);
    </script>
  </body>
</html>

Update with new routes to dependencies
Update with new routes to dependencies
