aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/js
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-29 13:34:03 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-29 13:34:03 -0500
commitd662dfd8d76d24b5ecbbff9503c84e908c538301 (patch)
tree93b8b53446f1bc27c7e471e78b89af67a2c4fcf2 /lib/js
parentaddaa90f75a4901481fb0f0f5890fff7e85e94db (diff)
ctextarea; s/header/include in the manual
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/urweb.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 474bdaf6..3a0e7f9f 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -501,6 +501,15 @@ function chk(s) {
return x;
}
+function tbx(s) {
+ var x = input(document.createElement("textarea"), s,
+ function(x) { return function(v) { if (x.innerHTML != v) x.innerHTML = v; }; });
+ x.innerHTML = s.data;
+ x.onkeyup = function() { sv(s, x.value) };
+
+ return x;
+}
+
function addOnChange(x, f) {
var old = x.onchange;
x.onchange = function() { old(); f (); };