Remove the cursor treatment

pull/1/head
Caleb James DeLisle 9 years ago
parent 86c4a69a97
commit a7da21ccba

@ -65,20 +65,19 @@ define([
var userDocStateDom = Vdom.create(Convert.hjson.to.vdom(JSON.parse(shjson)));
userDocStateDom.setAttribute("contentEditable", "true"); // lol wtf
var patch = (new DiffDom()).diff(inner, userDocStateDom);
console.log(userDocStateDom.outerHTML);
(new DiffDom()).apply(inner, patch);
};
var onRemote = function (shjson) {
// remember where the cursor is
cursor.update()
//cursor.update()
applyHjson(shjson);
cursor.find();
//cursor.find();
// put the cursor back where you left it
cursor.replace();
//cursor.replace();
};
var onInit = function (info) {
@ -139,14 +138,14 @@ define([
$textarea.val(JSON.stringify(hjson));
rti.bumpSharejs();
cursor.update()
//cursor.update()
});
['mouseup', 'keyup'].forEach(function (type) {
/*['mouseup', 'keyup'].forEach(function (type) {
editor.document.on(type, function (e) {
cursor.update();
});
});
});*/
});
};

Loading…
Cancel
Save