modify vdom main.js to adhere to new realtime-input api

pull/1/head
ansuz 9 years ago
parent fefb904261
commit 9b228eea6b

@ -165,6 +165,21 @@ define([
};
var realtimeOptions = {
// the textarea that we will sync
textarea: $textarea[0],
// the websocket URL (deprecated?)
websocketURL: Config.websocketURL,
// our username
userName: userName,
// the channel we will communicate over
channel: key.channel,
// our encryption key
cryptKey: key.cryptKey,
// configuration :D
doc: inner,
// first thing called
@ -183,12 +198,7 @@ define([
// pass in websocket/netflux object TODO
};
var rti = window.rti = realtimeInput.start($textarea[0], // synced element
Config.websocketURL, // websocketURL, ofc
userName, // userName
key.channel, // channelName
key.cryptKey, // key
realtimeOptions);
var rti = window.rti = realtimeInput.start(realtimeOptions);
$textarea.val(JSON.stringify(Convert.dom.to.hjson(inner)));

Loading…
Cancel
Save