added support for html content editable. Now you can bind event html tags to text types

This commit is contained in:
DadaMonad
2015-01-19 01:56:22 +00:00
parent 02d0ace241
commit 54844f4535
10 changed files with 492 additions and 143 deletions

View File

@@ -8,7 +8,7 @@
<script src="./index.js"></script>
</head>
<body>
<h1> PeerJs + Json Tutorial</h1>
<h1 contentEditable> PeerJs + Json Tutorial</h1>
<p> Collaborative Json editing with <a href="https://github.com/DadaMonad/Yatta/">Yatta</a>
and <a href="http://peerjs.com/">PeerJs</a> (WebRTC). </p>

View File

@@ -46,6 +46,7 @@ window.onload = function(){
var event = events[i];
if(event.name === "textfield" && event.type !== "delete"){
yatta.val("textfield").bind(textbox);
yatta.val("textfield").bind(document.querySelector("h1"))
}
}
});