Search code examples
phpjavascriptsqlwmd

how to save data in database from wmd editor


I am saving the content from the textarea its just saving this as plane text in database not like shown in preview how to store data shown in preview

//in form;
<textarea id="wmd-input" class="wmd-panel" name="content" ></textarea>

//in database
$content =  $_POST["content"] ;

Solution

  • you can do this by markdown.php you need to download and include the markdown.php and

    you just need to do

    $my_html=  Markdown($content);
    

    and now store the $my_html to database now it will work