running showdown.js serverside to conver Markdown to HTML (in PHP)

前端 未结 3 1787
一生所求
一生所求 2021-01-16 06:06

I am trying to implement WMD onto my website and was wondering how would I go about running showdown.js server side to convert markdown to HTML? (in order to store both in t

3条回答
  •  既然无缘
    2021-01-16 06:45

    You could use PHP Markdown, which is a port of the Markdown program written by John Gruber.

    Here is a example of how to use PHP Markdown with your code.

    include_once "markdown.php";
    $my_html = Markdown($my_text);
    

提交回复
热议问题