braid-text 0.2.54 → 0.2.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/editor.html +6 -2
- package/markdown-editor.html +4 -1
- package/package.json +1 -1
- package/simpleton-client.js +3 -1
package/editor.html
CHANGED
|
@@ -16,11 +16,15 @@
|
|
|
16
16
|
texty.disabled = true
|
|
17
17
|
texty.style.background = '#fee'
|
|
18
18
|
texty.style.border = '4px solid red'
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
on_ack: () => texty.style.caretColor = ''
|
|
20
21
|
});
|
|
21
22
|
|
|
22
23
|
texty.value = "";
|
|
23
|
-
texty.oninput = (e) =>
|
|
24
|
+
texty.oninput = (e) => {
|
|
25
|
+
texty.style.caretColor = 'red'
|
|
26
|
+
simpleton.changed();
|
|
27
|
+
}
|
|
24
28
|
|
|
25
29
|
function diff(before, after) {
|
|
26
30
|
let diff = diff_main(before, after);
|
package/markdown-editor.html
CHANGED
|
@@ -39,7 +39,9 @@ var simpleton = simpleton_client(location.pathname, {
|
|
|
39
39
|
t().disabled = true
|
|
40
40
|
t().style.background = '#fee'
|
|
41
41
|
t().style.border = '4px solid red'
|
|
42
|
-
}
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
on_ack: () => t().style.caretColor = ''
|
|
43
45
|
});
|
|
44
46
|
|
|
45
47
|
window.statebus_ready || (window.statebus_ready = []);
|
|
@@ -178,6 +180,7 @@ dom.WIKI = function() {
|
|
|
178
180
|
}
|
|
179
181
|
// Bail on edits that try to wipe us out
|
|
180
182
|
state.source = e.target.value;
|
|
183
|
+
e.target.style.caretColor = 'red'
|
|
181
184
|
simpleton.changed();
|
|
182
185
|
return update_markdown_later();
|
|
183
186
|
},
|
package/package.json
CHANGED
package/simpleton-client.js
CHANGED
|
@@ -45,7 +45,8 @@ function simpleton_client(url, {
|
|
|
45
45
|
generate_local_diff_update, // DEPRECATED
|
|
46
46
|
content_type,
|
|
47
47
|
on_error,
|
|
48
|
-
on_res
|
|
48
|
+
on_res,
|
|
49
|
+
on_ack
|
|
49
50
|
}) {
|
|
50
51
|
var peer = Math.random().toString(36).substr(2)
|
|
51
52
|
var current_version = []
|
|
@@ -194,6 +195,7 @@ function simpleton_client(url, {
|
|
|
194
195
|
throw e
|
|
195
196
|
}
|
|
196
197
|
outstanding_changes--
|
|
198
|
+
if (on_ack && !outstanding_changes) on_ack()
|
|
197
199
|
}
|
|
198
200
|
}
|
|
199
201
|
}
|