将 wmd-editor 与 php 一起使用

发布于 2024-10-01 01:25:22 字数 320 浏览 7 评论 0原文

我正在使用 WMD 编辑器(github 上的修改版)。 我使用 PHP 作为后端。当我发送编辑器的内容并尝试回显它们时,它们没有按预期显示。 我使用 $_POST 接收数据,然后将其放入 mysql 数据库中。

例如,当我尝试创建一个列表时:

  • Dummy
  • Text
  • This is

It 将其显示为 -Dummy -Text -This is。 我怎样才能让它输出列表?

I'm using WMD-Editor (the modifed one at github).
I'm using PHP as the backend. When I send the contents of Editor and try to echo them, they don't come out as expected.
I'm using $_POST to receive the data and then placing it into a mysql database.

For example when I try to make a list:

  • Dummy
  • Text
  • This is

It displays it as -Dummy -Text -This is.
How can I make it output the list?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青萝楚歌 2024-10-08 01:25:22

您收到的是 Markdown 语法的文本;要将其转换为 HTML,您需要 PhpMarkdown。只需下载该库,将其包含在您的脚本中,然后通过 Markdown() 函数传递文本(如“在您自己的程序中”部分中所述)。

What you are receiving is text with Markdown syntax; to convert it into HTML you need PhpMarkdown. Just download the library, include it in your script and pass the text thru the Markdown() function (as explained in the 'In your own programs' section).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文