|
|
@ -58,7 +58,7 @@ define([
|
|
|
|
window.alert("Server Connection Lost");
|
|
|
|
window.alert("Server Connection Lost");
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var rt = Realtime.start(config);
|
|
|
|
var rt = window.rt = Realtime.start(config);
|
|
|
|
|
|
|
|
|
|
|
|
var cursor = Cursor($textarea[0]);
|
|
|
|
var cursor = Cursor($textarea[0]);
|
|
|
|
|
|
|
|
|
|
|
@ -114,13 +114,20 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// simulate a keypress so the event goes through..
|
|
|
|
// prevent default behaviour for tab
|
|
|
|
// prevent default behaviour for tab
|
|
|
|
e.preventDefault();
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
rt.bumpSharejs();
|
|
|
|
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$textarea.on('change', function () {
|
|
|
|
|
|
|
|
rt.bumpSharejs();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$run.click(function (e) {
|
|
|
|
$run.click(function (e) {
|
|
|
|
e.preventDefault();
|
|
|
|
e.preventDefault();
|
|
|
|
var content = $textarea.val();
|
|
|
|
var content = $textarea.val();
|
|
|
|