Getting the content of a contenteditable div

Hope y’all can help me out with this.

I’m trying to create one of those HTML wysiwig boxes (much like this one that I am typing in right now, but I see this is a textarea) for text entry on a webpage.

The DIV looks like this:

<div id="divEditor" runat="server" contenteditable="true" style="height:200px; border:1px solid black">
                This is the content. It is a test paragraph.
            </div>

I use execCommand(doFormat(‘bold’), false, null) to style the DIV content.

The problem is, I want to retrieve the content to save into a database, but the innerHTML of the DIV is merely the text itself without the formatting.

Any ideas? Am I barking up the wrong tree?

(There is an HTML editor control in the AJAX control toolkit, but it only exists for .NET 4.0 and unfortunately at work we are still using 2.0)