Better version

in
Subscribe to Better version 2 posts, 2 voices



Jonatron Scriptwright
This works better. Don't make me fork it:
unsafeWindow.addComment = function paragraphify(id) {

  var form = document.forms.namedItem(id);

  var text = form.elements.namedItem("text");

  text.value = '

' + text.value text.value = text.value.replace(/(\n+)/g,'

$1'); text.value = text.value + '

' addComment(id); };
 
IndigoSwash User
FirefoxMacintosh

This replacement version seems to no longer work :(

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel