Jeditable textarea formatting
<p>I'm following the advice here: <a href="http://birdchan.com/home/2012/02/24/jeditable-textile-textarea-renderer-issue/" rel="nofollow">http://birdchan.com/home/2012/02/24/jeditable-textile-textarea-renderer-issue/</a> but I have not been able to get this to work. </p>

<p>I have a textarea I am using jeditable on but after editing text comes back like: 1\n2\n3\n4\n5</p>

<p>When it should be:
1<br>
2<br>
3<br>
4</p>

<p>So far my php code works great for displaying these breaks on the screen. I have:</p>

<pre><code>$notes1  = str_replace('\n', '&lt;br&gt;', $notes);
</code></pre>

<p>I am not as familiar with javascript and I am really struggling to get my callback to give me the equivalent of the above php code. So far I have:</p>

<pre><code>$(".dblclick").editable("pop_details_action.php", { 
    //cssclass : 'medium',
    data: '&lt;?php /*echo $outbro;*/ ?&gt;',
     id   : 'elementid',
     name : 'newvalue',
     type: 'textarea',
     //select: true,
     submit: 'Done',
      callback: function(value, settings) {
      /* Convert &lt;br&gt; to newline. */
      var retval = value.replace(/\n/gi, '&lt;br&gt;');
      return retval;},
     cancel:'Cancel',
     indicator : "&lt;img src='../images/indicator.gif'&gt;",
     tooltip   : "Double-Click to Edit",
     event     : "dblclick";
     submitdata : {foo: "&lt;?php echo $category; ?&gt;"}
  });
</code></pre>

<p>This is updating the database just fine and when I reload the page, thanks to my php code it displays fine but I want my users to see the well formatted results immediately after editing their text. I feel my problem lies in:</p>

<pre><code>var retval = value.replace(/\n/gi, '&lt;br&gt;');
</code></pre>
