From 9e95b046737ab2da8117eb273f6bb50cca7d43dc Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 29 Dec 2009 13:34:03 -0500 Subject: ctextarea; s/header/include in the manual --- lib/js/urweb.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/js') 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 (); }; -- cgit v1.2.3