This is not a duplicate question, I know how to create a rich editor, but I encounter problems
I want to create a rich text field like stackoverflow.
I import the wmd plugin just like SO.
When I save the topic in mysql, it saves the processed text as follows:
<p> hello world </p>
<pre> <code> class Text {} </code> </pre>
This is normal, I think, because the html page can do it right.
But when I try to edit this section, it directly displays the code in my text area :

I need this (as the first time I entered):

My text code is very simple:
<div id="wmd-button-bar"></div>
<textarea id="wmd-input" name="description" onblur="checkForm()">${topic?.description}</textarea>
<div id="wmd-preview"></div>
Can anybody help? Thank.