Passing html data from a div to php
<p>I am able to get the total text data from a contentEditable div, but I would like to pass the data just as it is in the div with the HTML elements in tact to a PHP file. At the moment only the text is being returned by log stripped of html tags, </p>

<hr>

<p>First I dynamically add this to the div </p>

<pre><code>       var user = "&lt;a contenteditable='false' href='#' &gt;"+name+" &lt;/a&gt;";
       $("#message").append(user);          
</code></pre>

<hr>

<p>But when I try to log the content I only see the text within the 'a' tag returned </p>

<pre><code>         var msg = $('#message').html();
         console.log(msg);
</code></pre>

<hr>

<p>THi is my HTML</p>

<pre><code>        &lt;div name="message" contentEditable="true" id="message" &gt;&lt;/div&gt;
</code></pre>

<p>So an Example of what I would like to pass is this </p>

<pre><code>        "Hello world!&lt;a href='#'&gt;Ned&lt;/a&gt; Fails!" 
</code></pre>

<p>Any help is appreciated, thanks.</p>
